Struct rustc_middle::mir::PlaceRef
source · [−]Fields
local: Localprojection: &'tcx [PlaceElem<'tcx>]Implementations
sourceimpl<'tcx> PlaceRef<'tcx>
impl<'tcx> PlaceRef<'tcx>
sourcepub fn local_or_deref_local(&self) -> Option<Local>
pub fn local_or_deref_local(&self) -> Option<Local>
Finds the innermost Local from this Place, if it is either a local itself or
a single deref of a local.
sourcepub fn as_local(&self) -> Option<Local>
pub fn as_local(&self) -> Option<Local>
If this place represents a local variable like _X with no
projections, return Some(_X).
pub fn last_projection(&self) -> Option<(PlaceRef<'tcx>, PlaceElem<'tcx>)>
Trait Implementations
sourceimpl<'tcx> Ord for PlaceRef<'tcx>
impl<'tcx> Ord for PlaceRef<'tcx>
sourceimpl<'tcx> PartialOrd<PlaceRef<'tcx>> for PlaceRef<'tcx>
impl<'tcx> PartialOrd<PlaceRef<'tcx>> for PlaceRef<'tcx>
sourcefn partial_cmp(&self, other: &PlaceRef<'tcx>) -> Option<Ordering>
fn partial_cmp(&self, other: &PlaceRef<'tcx>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<'tcx> Copy for PlaceRef<'tcx>
impl<'tcx> Eq for PlaceRef<'tcx>
impl<'tcx> StructuralEq for PlaceRef<'tcx>
impl<'tcx> StructuralPartialEq for PlaceRef<'tcx>
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for PlaceRef<'tcx>
impl<'tcx> Send for PlaceRef<'tcx>
impl<'tcx> Sync for PlaceRef<'tcx>
impl<'tcx> Unpin for PlaceRef<'tcx>
impl<'tcx> !UnwindSafe for PlaceRef<'tcx>
Blanket Implementations
sourceimpl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T where
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T where
T: Copy,
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self
fn allocate_from_iter<'a>(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = Self>
) -> &'a mut [Self]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes