pub(crate) struct TraitEnsurance<'tcx> {
pub def_id: DefId,
pub impl_def_id: DefId,
pub self_ty_def_id: Option<DefId>,
pub kind: TraitEnsuranceKind<'tcx>,
}Expand description
Collected verification data for an impl unsafe Trait for Type block.
Covers two cases, distinguished by whether the trait has methods:
- marker traits (
Send/Sync) carry type-level obligations, and - unsafe traits with methods carry method-level
ensurescontracts (verification deferred).
Fields§
§def_id: DefIdThe trait being implemented.
impl_def_id: DefIdThe impl ... for Type block’s DefId (carries the impl’s generic bounds,
e.g. T: Send).
self_ty_def_id: Option<DefId>The concrete type that implements the trait (e.g. SomeStruct).
kind: TraitEnsuranceKind<'tcx>The obligations to verify, keyed by whether the trait has methods.
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for TraitEnsurance<'tcx>
impl<'tcx> !UnwindSafe for TraitEnsurance<'tcx>
impl<'tcx> DynSend for TraitEnsurance<'tcx>
impl<'tcx> DynSync for TraitEnsurance<'tcx>
impl<'tcx> Freeze for TraitEnsurance<'tcx>
impl<'tcx> Send for TraitEnsurance<'tcx>
impl<'tcx> Sync for TraitEnsurance<'tcx>
impl<'tcx> Unpin for TraitEnsurance<'tcx>
impl<'tcx> UnsafeUnpin for TraitEnsurance<'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> 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