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]
fn clone(&self) -> BindingAnnotation
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for BindingAnnotation
[src]
fn eq(&self, __arg_0: &BindingAnnotation) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for BindingAnnotation
[src]
impl Encodable for BindingAnnotation
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
[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]
fn decode<__D: Decoder>(
__arg_0: &mut __D
) -> Result<BindingAnnotation, __D::Error>
[src]
__arg_0: &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 Hash for BindingAnnotation
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for BindingAnnotation
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for BindingAnnotation
[src]
impl<'tcx> HashStable<StableHashingContext<'tcx>> for BindingAnnotation
[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'tcx>,
__hasher: &mut StableHasher<W>
)
[src]
&self,
__ctx: &mut StableHashingContext<'tcx>,
__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?