Enum rustc_mir::monomorphize::item::InstantiationMode[][src]

pub enum InstantiationMode {
    GloballyShared {
        may_conflict: bool,
    },
    LocalCopy,
}
🔬 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?

Describes how a monomorphization will be instantiated in object files.

Variants

🔬 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?

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

🔬 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?

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.

🔬 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?

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 for InstantiationMode
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for InstantiationMode
[src]

impl Clone for InstantiationMode
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for InstantiationMode
[src]

impl Debug for InstantiationMode
[src]

Formats the value using the given formatter. Read more

impl Hash for InstantiationMode
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for InstantiationMode

impl Sync for InstantiationMode