Struct rustc_mir::monomorphize::partitioning::CodegenUnit [−][src]
pub struct CodegenUnit<'tcx> {
name: InternedString,
items: HashMap<MonoItem<'tcx>, (Linkage, Visibility), BuildHasherDefault<FxHasher>>,
size_estimate: Option<usize>,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
name: InternedString
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A name for this CGU. Incremental compilation requires that name be unique amongst all crates. Therefore, it should contain something unique to this crate (e.g., a module path) as well as the crate name and disambiguator.
items: HashMap<MonoItem<'tcx>, (Linkage, Visibility), BuildHasherDefault<FxHasher>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
size_estimate: Option<usize>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<'tcx> CodegenUnit<'tcx>[src]
impl<'tcx> CodegenUnit<'tcx>pub fn new(name: InternedString) -> CodegenUnit<'tcx>[src]
pub fn new(name: InternedString) -> CodegenUnit<'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn name(&self) -> &InternedString[src]
pub fn name(&self) -> &InternedString🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn set_name(&mut self, name: InternedString)[src]
pub fn set_name(&mut self, name: InternedString)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn items(
&self
) -> &HashMap<MonoItem<'tcx>, (Linkage, Visibility), BuildHasherDefault<FxHasher>>[src]
pub fn items(
&self
) -> &HashMap<MonoItem<'tcx>, (Linkage, Visibility), BuildHasherDefault<FxHasher>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn items_mut(
&mut self
) -> &mut HashMap<MonoItem<'tcx>, (Linkage, Visibility), BuildHasherDefault<FxHasher>>[src]
pub fn items_mut(
&mut self
) -> &mut HashMap<MonoItem<'tcx>, (Linkage, Visibility), BuildHasherDefault<FxHasher>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn mangle_name(human_readable_name: &str) -> String[src]
pub fn mangle_name(human_readable_name: &str) -> String🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn estimate_size(&mut self, tcx: &TyCtxt<'a, 'tcx, 'tcx>)[src]
pub fn estimate_size(&mut self, tcx: &TyCtxt<'a, 'tcx, 'tcx>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn size_estimate(&self) -> usize[src]
pub fn size_estimate(&self) -> usize🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn modify_size_estimate(&mut self, delta: usize)[src]
pub fn modify_size_estimate(&mut self, delta: usize)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for CodegenUnit<'tcx>[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for CodegenUnit<'tcx>fn hash_stable<W>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
) where
W: StableHasherResult, [src]
fn hash_stable<W>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
) where
W: StableHasherResult, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'tcx> CodegenUnitExt<'tcx> for CodegenUnit<'tcx>[src]
impl<'tcx> CodegenUnitExt<'tcx> for CodegenUnit<'tcx>fn as_codegen_unit(&self) -> &CodegenUnit<'tcx>[src]
fn as_codegen_unit(&self) -> &CodegenUnit<'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn contains_item(&self, item: &MonoItem<'tcx>) -> bool[src]
fn contains_item(&self, item: &MonoItem<'tcx>) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn name<'a>(&'a self) -> &'a InternedString where
'tcx: 'a, [src]
fn name<'a>(&'a self) -> &'a InternedString where
'tcx: 'a, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn items(&self) -> &FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>[src]
fn items(&self) -> &FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn work_product_id(&self) -> WorkProductId[src]
fn work_product_id(&self) -> WorkProductId🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn items_in_deterministic_order<'a>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> Vec<(MonoItem<'tcx>, (Linkage, Visibility))>[src]
fn items_in_deterministic_order<'a>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>
) -> Vec<(MonoItem<'tcx>, (Linkage, Visibility))>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Auto Trait Implementations
impl<'tcx> !Send for CodegenUnit<'tcx>
impl<'tcx> !Send for CodegenUnit<'tcx>impl<'tcx> !Sync for CodegenUnit<'tcx>
impl<'tcx> !Sync for CodegenUnit<'tcx>