pub(crate) struct ContractPlace<'tcx> {
pub base: PlaceBase,
pub projections: Vec<ContractProjection<'tcx>>,
}Expand description
A place a contract refers to: a PlaceBase root plus a sequence of
ContractProjection steps into it (e.g. self.next.value, head.iter()).
Fields§
§base: PlaceBaseThe root: return value, an argument, or a MIR local.
projections: Vec<ContractProjection<'tcx>>Field / Some-unwrap / element steps from the base down.
Implementations§
Source§impl<'tcx> ContractPlace<'tcx>
impl<'tcx> ContractPlace<'tcx>
pub(crate) fn display_user_friendly( &self, tcx: TyCtxt<'tcx>, struct_def_id: Option<DefId>, fn_def_id: Option<DefId>, ) -> String
Source§impl<'tcx> ContractPlace<'tcx>
impl<'tcx> ContractPlace<'tcx>
pub(crate) fn local(base: usize, fields: Vec<(usize, Ty<'tcx>)>) -> Self
pub(crate) fn arg(index: usize) -> Self
pub(crate) fn local_base(&self) -> Option<usize>
Sourcepub(crate) fn plain_field_path(&self) -> Option<Vec<usize>>
pub(crate) fn plain_field_path(&self) -> Option<Vec<usize>>
The field indices when this place is a pure Field chain (no Downcast
/ ForEach steps), otherwise None. Shared by the exec- and
checker-side Len evaluators.
Trait Implementations§
Source§impl<'tcx> Clone for ContractPlace<'tcx>
impl<'tcx> Clone for ContractPlace<'tcx>
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for ContractPlace<'tcx>
impl<'tcx> !UnwindSafe for ContractPlace<'tcx>
impl<'tcx> DynSend for ContractPlace<'tcx>
impl<'tcx> DynSync for ContractPlace<'tcx>
impl<'tcx> Freeze for ContractPlace<'tcx>
impl<'tcx> Send for ContractPlace<'tcx>
impl<'tcx> Sync for ContractPlace<'tcx>
impl<'tcx> Unpin for ContractPlace<'tcx>
impl<'tcx> UnsafeUnpin for ContractPlace<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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