[−][src]Enum rustc_middle::mir::ProjectionElem
Variants
Field(Field, T)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
These indices are generated by slice patterns.
If from_end is true slice[from..slice.len() - to].
Otherwise array[from..to].
Fields of Subslice
Downcast(Option<Symbol>, VariantIdx)"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.
The included Symbol is the name of the variant, used for printing MIR.
Implementations
impl<V, T> ProjectionElem<V, T>[src]
fn is_indirect(&self) -> bool[src]
Returns true if the target of this projection may refer to a different region of memory
than the base.
Trait Implementations
impl<V: Clone, T: Clone> Clone for ProjectionElem<V, T>[src]
fn clone(&self) -> ProjectionElem<V, T>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<V: Copy, T: Copy> Copy for ProjectionElem<V, T>[src]
impl<V: Debug, T: Debug> Debug for ProjectionElem<V, T>[src]
impl<'tcx, V, T, __D: TyDecoder<'tcx>> Decodable<__D> for ProjectionElem<V, T> where
T: Decodable<__D>,
V: Decodable<__D>, [src]
T: Decodable<__D>,
V: Decodable<__D>,
impl<'tcx, V, T, __E: TyEncoder<'tcx>> Encodable<__E> for ProjectionElem<V, T> where
T: Encodable<__E>,
V: Encodable<__E>, [src]
T: Encodable<__E>,
V: Encodable<__E>,
impl<V: Eq, T: Eq> Eq for ProjectionElem<V, T>[src]
impl<V: Hash, T: Hash> Hash for ProjectionElem<V, T>[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<'__ctx, V, T> HashStable<StableHashingContext<'__ctx>> for ProjectionElem<V, T> where
T: HashStable<StableHashingContext<'__ctx>>,
V: HashStable<StableHashingContext<'__ctx>>, [src]
T: HashStable<StableHashingContext<'__ctx>>,
V: HashStable<StableHashingContext<'__ctx>>,
fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)[src]
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
impl<V: Ord, T: Ord> Ord for ProjectionElem<V, T>[src]
fn cmp(&self, other: &ProjectionElem<V, T>) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl<V: PartialEq, T: PartialEq> PartialEq<ProjectionElem<V, T>> for ProjectionElem<V, T>[src]
fn eq(&self, other: &ProjectionElem<V, T>) -> bool[src]
fn ne(&self, other: &ProjectionElem<V, T>) -> bool[src]
impl<V: PartialOrd, T: PartialOrd> PartialOrd<ProjectionElem<V, T>> for ProjectionElem<V, T>[src]
fn partial_cmp(&self, other: &ProjectionElem<V, T>) -> Option<Ordering>[src]
fn lt(&self, other: &ProjectionElem<V, T>) -> bool[src]
fn le(&self, other: &ProjectionElem<V, T>) -> bool[src]
fn gt(&self, other: &ProjectionElem<V, T>) -> bool[src]
fn ge(&self, other: &ProjectionElem<V, T>) -> bool[src]
impl<V, T> StructuralEq for ProjectionElem<V, T>[src]
impl<V, T> StructuralPartialEq for ProjectionElem<V, T>[src]
Auto Trait Implementations
impl<V, T> RefUnwindSafe for ProjectionElem<V, T> where
T: RefUnwindSafe,
V: RefUnwindSafe,
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, T> Send for ProjectionElem<V, T> where
T: Send,
V: Send,
T: Send,
V: Send,
impl<V, T> Sync for ProjectionElem<V, T> where
T: Sync,
V: Sync,
T: Sync,
V: Sync,
impl<V, T> Unpin for ProjectionElem<V, T> where
T: Unpin,
V: Unpin,
T: Unpin,
V: Unpin,
impl<V, T> UnwindSafe for ProjectionElem<V, T> where
T: UnwindSafe,
V: UnwindSafe,
T: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
T: Copy, [src]
T: Copy,
fn allocate_on(Self, &'a Arena<'tcx>) -> &'a mut T[src]
fn allocate_from_iter(
&'a Arena<'tcx>,
impl IntoIterator<Item = T>
) -> &'a mut [T][src]
&'a Arena<'tcx>,
impl IntoIterator<Item = T>
) -> &'a mut [T]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<Ctxt, T> DepNodeParams<Ctxt> for T where
Ctxt: DepContext,
T: HashStable<<Ctxt as DepContext>::StableHashingContext> + Debug, [src]
Ctxt: DepContext,
T: HashStable<<Ctxt as DepContext>::StableHashingContext> + Debug,
default fn can_reconstruct_query_key() -> bool[src]
default fn to_fingerprint(&self, tcx: Ctxt) -> Fingerprint[src]
default fn to_debug_str(&self, Ctxt) -> String[src]
default fn recover(Ctxt, &DepNode<<Ctxt as DepContext>::DepKind>) -> Option<T>[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> MaybeResult<T> for T[src]
type Error = !
fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]
fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]
impl<'tcx, T> Subst<'tcx> for T where
T: TypeFoldable<'tcx>, [src]
T: TypeFoldable<'tcx>,
fn subst_spanned(&Self, TyCtxt<'tcx>, &[GenericArg<'tcx>], Option<Span>) -> T[src]
fn subst(&self, tcx: TyCtxt<'tcx>, substs: &[GenericArg<'tcx>]) -> Self[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.