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
Unannotated🔬 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).
Mutable🔬 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.
Ref🔬 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
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?
Annotated as ref mut x.
Trait Implementations
impl Clone for BindingAnnotation[src]
impl Clone for BindingAnnotationfn clone(&self) -> BindingAnnotation[src]
fn clone(&self) -> BindingAnnotationReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for BindingAnnotation[src]
impl PartialEq for BindingAnnotationfn eq(&self, other: &BindingAnnotation) -> bool[src]
fn eq(&self, other: &BindingAnnotation) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Encodable for BindingAnnotation[src]
impl Encodable for BindingAnnotationfn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>🔬 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]
impl Decodable for BindingAnnotationfn decode<__D: Decoder>(d: &mut __D) -> Result<BindingAnnotation, __D::Error>[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<BindingAnnotation, __D::Error>🔬 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]
impl Debug for BindingAnnotationfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Copy for BindingAnnotation[src]
impl Copy for BindingAnnotationimpl<'a, 'tcx> HashStable<StableHashingContext<'a>> for BindingAnnotation[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for BindingAnnotationfn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)🔬 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 Send for BindingAnnotationimpl Sync for BindingAnnotation
impl Sync for BindingAnnotation