flowistry_pdg_construction::calling_convention

Struct PlaceTranslation

Source
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>

Source

pub fn make_translated_place(&self) -> Place<'tcx>

Complete the translation and return a precise parent place.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Captures<'_> for T
where T: ?Sized,