Enum rustc::mir::ProjectionElem
[−]
[src]
pub enum ProjectionElem<'tcx, V, T> { Deref, Field(Field, T), Index(V), ConstantIndex { offset: u32, min_length: u32, from_end: bool, }, Subslice { from: u32, to: u32, }, Downcast(&'tcx AdtDef, 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
Deref
🔬 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?
Field(Field, T)
🔬 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?
Index(V)
🔬 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?
ConstantIndex
🔬 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?
These indices are generated by slice patterns. Easiest to explain by example:
[X, _, .._, _, _] => { offset: 0, min_length: 4, from_end: false }, [_, X, .._, _, _] => { offset: 1, min_length: 4, from_end: false }, [_, _, .._, X, _] => { offset: 2, min_length: 4, from_end: true }, [_, _, .._, _, X] => { offset: 1, min_length: 4, from_end: true },
Fields of ConstantIndex
offset: u32 | 🔬 This is a nightly-only experimental API. ( |
min_length: u32 | 🔬 This is a nightly-only experimental API. ( |
from_end: bool | 🔬 This is a nightly-only experimental API. ( |
Subslice
🔬 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?
These indices are generated by slice patterns.
slice[from:-to] in Python terms.
Fields of Subslice
from: u32 | 🔬 This is a nightly-only experimental API. ( |
to: u32 | 🔬 This is a nightly-only experimental API. ( |
Downcast(&'tcx AdtDef, 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?
"Downcast" to a variant of an ADT. Currently, we only introduce this for ADTs with more than one variant. It may be better to just introduce it always, or always for enums.
Trait Implementations
impl<'gcx, V, T> HashStable<StableHashingContext<'gcx>> for ProjectionElem<'gcx, V, T> where
V: HashStable<StableHashingContext<'gcx>>,
T: HashStable<StableHashingContext<'gcx>>,
[src]
V: HashStable<StableHashingContext<'gcx>>,
T: HashStable<StableHashingContext<'gcx>>,
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'gcx>,
hasher: &mut StableHasher<W>
)
[src]
&self,
hcx: &mut StableHashingContext<'gcx>,
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?
impl<'tcx, V: Clone, T: Clone> Clone for ProjectionElem<'tcx, V, T>
[src]
fn clone(&self) -> ProjectionElem<'tcx, V, T>
[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<'tcx, V: Debug, T: Debug> Debug for ProjectionElem<'tcx, V, T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'tcx, V: PartialEq, T: PartialEq> PartialEq for ProjectionElem<'tcx, V, T>
[src]
fn eq(&self, __arg_0: &ProjectionElem<'tcx, V, T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ProjectionElem<'tcx, V, T>) -> bool
[src]
This method tests for !=
.
impl<'tcx, V: Eq, T: Eq> Eq for ProjectionElem<'tcx, V, T>
[src]
impl<'tcx, V: Hash, T: Hash> Hash for ProjectionElem<'tcx, V, T>
[src]
fn hash<__HVT: Hasher>(&self, __arg_0: &mut __HVT)
[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<'tcx, V: Encodable, T: Encodable> Encodable for ProjectionElem<'tcx, V, T>
[src]
fn encode<__SVT: Encoder>(
&self,
__arg_0: &mut __SVT
) -> Result<(), __SVT::Error>
[src]
&self,
__arg_0: &mut __SVT
) -> Result<(), __SVT::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<'tcx, V: Decodable, T: Decodable> Decodable for ProjectionElem<'tcx, V, T>
[src]
fn decode<__DVT: Decoder>(
__arg_0: &mut __DVT
) -> Result<ProjectionElem<'tcx, V, T>, __DVT::Error>
[src]
__arg_0: &mut __DVT
) -> Result<ProjectionElem<'tcx, V, T>, __DVT::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?