Enum rustc::ty::VariantDiscr [] [src]

pub enum VariantDiscr {
    Explicit(DefId),
    Relative(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?

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?

Explicit value for this variant, i.e. X = 123. The DefId corresponds to the embedded constant.

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

The previous variant's discriminant plus one. For efficiency reasons, the distance from the last Explicit discriminant is being stored, or 0 for the first variant, if it has none.

Trait Implementations

impl<'tcx> HashStable<StableHashingContext<'tcx>> for VariantDiscr
[src]

[src]

🔬 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 Copy for VariantDiscr
[src]

impl Clone for VariantDiscr
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for VariantDiscr
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for VariantDiscr
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for VariantDiscr
[src]

impl Encodable for VariantDiscr
[src]

[src]

🔬 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 Decodable for VariantDiscr
[src]

[src]

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