[−][src]Enum rustc_middle::mir::mono::InstantiationMode

pub enum InstantiationMode {
    GloballyShared {
        may_conflict: bool,
    },
    LocalCopy,
}

Describes how a monomorphization will be instantiated in object files.

Variants

GloballyShared

There will be exactly one instance of the given MonoItem. It will have external linkage so that it can be linked to from other codegen units.

Fields of GloballyShared

may_conflict: bool

In some compilation scenarios we may decide to take functions that are typically LocalCopy and instead move them to GloballyShared to avoid codegenning them a bunch of times. In this situation, however, our local copy may conflict with other crates also inlining the same function.

This flag indicates that this situation is occurring, and informs symbol name calculation that some extra mangling is needed to avoid conflicts. Note that this may eventually go away entirely if ThinLTO enables us to always have a globally shared instance of a function within one crate's compilation.

LocalCopy

Each codegen unit containing a reference to the given MonoItem will have its own private copy of the function (with internal linkage).

Trait Implementations

impl PartialEq<InstantiationMode> for InstantiationMode[src]

impl StructuralPartialEq for InstantiationMode[src]

Auto Trait Implementations

impl RefUnwindSafe for InstantiationMode

impl Send for InstantiationMode

impl Sync for InstantiationMode

impl Unpin for InstantiationMode

impl UnwindSafe for InstantiationMode

Blanket Implementations

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

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

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

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

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

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

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

type Error = !

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.

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.

impl<T> WithConstness for T[src]