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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for BindingAnnotation
[src]

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

This method tests for !=.

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

🔬 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 Debug for BindingAnnotation
[src]

Formats the value using the given formatter. Read more

impl Copy for BindingAnnotation
[src]

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

Auto Trait Implementations

impl Send for BindingAnnotation

impl Sync for BindingAnnotation