pub struct PlaceTranslation<'a, 'tcx> {
new_base: Place<'tcx>,
additional_projection: &'tcx [PlaceElem<'tcx>],
scope: &'a PlaceTranslator<'a, 'tcx>,
}
Expand description
The result of calculating a translation from a child place (in a called function) to a parent place (in the caller).
This is partially translated and thus allows us to either complete the
translation to a precise parent place (Self::make_translated_place
),
e.g. one that corresponds to the child 1-1, or to just use the parent place,
for strategic overtaint, e.g. discarding the child projections
(Self::base_place
).
Fields§
§new_base: Place<'tcx>
§additional_projection: &'tcx [PlaceElem<'tcx>]
§scope: &'a PlaceTranslator<'a, 'tcx>
Implementations§
Source§impl<'tcx> PlaceTranslation<'_, 'tcx>
impl<'tcx> PlaceTranslation<'_, 'tcx>
Sourcepub fn make_translated_place(&self) -> Place<'tcx>
pub fn make_translated_place(&self) -> Place<'tcx>
Complete the translation and return a precise parent place.
Sourcepub fn base_place(&self) -> Place<'tcx>
pub fn base_place(&self) -> Place<'tcx>
Return the base version of the parent place with no child projections applied.
Auto Trait Implementations§
impl<'a, 'tcx> Freeze for PlaceTranslation<'a, 'tcx>
impl<'a, 'tcx> !RefUnwindSafe for PlaceTranslation<'a, 'tcx>
impl<'a, 'tcx> !Send for PlaceTranslation<'a, 'tcx>
impl<'a, 'tcx> !Sync for PlaceTranslation<'a, 'tcx>
impl<'a, 'tcx> Unpin for PlaceTranslation<'a, 'tcx>
impl<'a, 'tcx> !UnwindSafe for PlaceTranslation<'a, 'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more