Enum rustc::hir::BindingAnnotation [] [src]

pub enum BindingAnnotation {
    Unannotated,
    Mutable,
    Ref,
    RefMut,
}
🔬 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 binding annotations given in the HIR for a binding. Note that this is not the final binding mode that we infer after type inference.

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?

No binding annotation given: this means that the final binding mode will depend on whether we have skipped through a & reference when matching. For example, the x in Some(x) will have binding mode None; if you do let Some(x) = &Some(22), it will ultimately be inferred to be by-reference.

Note that implicit reference skipping is not implemented yet (#42640).

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

Annotated with mut x -- could be either ref or not, similar to None.

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

Annotated as ref, like ref x

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

Annotated as ref mut x.

Trait Implementations

impl Clone for BindingAnnotation
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for BindingAnnotation
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Eq for BindingAnnotation
[src]

impl Encodable for BindingAnnotation
[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 BindingAnnotation
[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 Hash for BindingAnnotation
[src]

[src]

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

1.3.0
[src]

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

impl Debug for BindingAnnotation
[src]

[src]

Formats the value using the given formatter. Read more

impl Copy for BindingAnnotation
[src]

impl<'tcx> HashStable<StableHashingContext<'tcx>> for BindingAnnotation
[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?