Struct rustc_middle::mir::mono::CodegenUnit[−][src]

pub struct CodegenUnit<'tcx> {
    name: Symbol,
    items: FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>,
    size_estimate: Option<usize>,
    primary: bool,
}

Fields

name: Symbol
Expand description

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: FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>size_estimate: Option<usize>primary: bool

Implementations

impl<'tcx> CodegenUnit<'tcx>[src]

pub fn new(name: Symbol) -> CodegenUnit<'tcx>[src]

pub fn name(&self) -> Symbol[src]

pub fn set_name(&mut self, name: Symbol)[src]

pub fn is_primary(&self) -> bool[src]

pub fn make_primary(&mut self)[src]

pub fn items(&self) -> &FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>[src]

pub fn items_mut(
    &mut self
) -> &mut FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>
[src]

pub fn mangle_name(human_readable_name: &str) -> String[src]

pub fn estimate_size(&mut self, tcx: TyCtxt<'tcx>)[src]

pub fn size_estimate(&self) -> usize[src]

pub fn modify_size_estimate(&mut self, delta: usize)[src]

pub fn contains_item(&self, item: &MonoItem<'tcx>) -> bool[src]

pub fn work_product_id(&self) -> WorkProductId[src]

pub fn work_product(&self, tcx: TyCtxt<'_>) -> WorkProduct[src]

pub fn items_in_deterministic_order(
    &self,
    tcx: TyCtxt<'tcx>
) -> Vec<(MonoItem<'tcx>, (Linkage, Visibility))>
[src]

pub fn codegen_dep_node(&self, tcx: TyCtxt<'tcx>) -> DepNode[src]

Trait Implementations

impl<'tcx> ArenaAllocatable<'tcx, CodegenUnit<'tcx>> for CodegenUnit<'tcx>[src]

fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self[src]

fn allocate_from_iter<'a>(
    arena: &'a Arena<'tcx>,
    iter: impl IntoIterator<Item = Self>
) -> &'a mut [Self]ⓘ

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

impl<'tcx> Debug for CodegenUnit<'tcx>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for CodegenUnit<'tcx>[src]

fn hash_stable(
    &self,
    hcx: &mut StableHashingContext<'a>,
    hasher: &mut StableHasher
)
[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for CodegenUnit<'tcx>

impl<'tcx> !Send for CodegenUnit<'tcx>

impl<'tcx> !Sync for CodegenUnit<'tcx>

impl<'tcx> Unpin for CodegenUnit<'tcx>

impl<'tcx> !UnwindSafe for CodegenUnit<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> MaybeResult<T> for T[src]

type Error = !

pub fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]

pub fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> WithConstness for T[src]

fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]

fn with_const(self) -> ConstnessAnd<Self>[src]

fn without_const(self) -> ConstnessAnd<Self>[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]