pub struct AssembledProgram {
pub source: String,
pub provenance: Provenance,
pub source_map: SourceMap,
pub scope: ScopeInfo,
}Expand description
One assembled compilation unit: the combined source plus the metadata later passes need for qualified-name resolution, collision diagnostics, and cross-file error attribution.
Fields§
§source: StringThe single combined source string: the entry (with its leading prose and
## Main) with every imported module’s code spliced in before its first
## section, dependencies first. Fed verbatim to the existing
lex/parse/codegen seam.
provenance: ProvenanceWhich module defines each bare name — the ground truth for the hard-error on an ambiguous bare reference and for qualified→canonical resolution.
source_map: SourceMapMaps a byte offset in source back to the file it came
from, so a diagnostic in an imported module reports against THAT file
rather than the combined blob.
scope: ScopeInfoPer-file name scope — what each file may reference (its own definitions
plus the exports of the modules it explicitly imports). Drives
check_scopes, which forbids transitive leakage.
Auto Trait Implementations§
impl Freeze for AssembledProgram
impl RefUnwindSafe for AssembledProgram
impl Send for AssembledProgram
impl Sync for AssembledProgram
impl Unpin for AssembledProgram
impl UnsafeUnpin for AssembledProgram
impl UnwindSafe for AssembledProgram
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.