pub struct CachedBody<'tcx> {
body: Body<'tcx>,
input_facts: FlowistryFacts,
}
Expand description
A mir Body
and all the additional borrow checking facts that our
points-to analysis needs.
Fields§
§body: Body<'tcx>
§input_facts: FlowistryFacts
Implementations§
Source§impl<'tcx> CachedBody<'tcx>
impl<'tcx> CachedBody<'tcx>
Sourcefn retrieve(tcx: TyCtxt<'tcx>, local_def_id: LocalDefId) -> Self
fn retrieve(tcx: TyCtxt<'tcx>, local_def_id: LocalDefId) -> Self
Retrieve a body and the necessary facts for a local item.
Ensure this is called early enough in the compiler
(like after_expansion
) so that the body has not been stolen yet.
Trait Implementations§
Source§impl<'tcx> Debug for CachedBody<'tcx>
impl<'tcx> Debug for CachedBody<'tcx>
Source§impl<'tcx, __D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<__D> for CachedBody<'tcx>
impl<'tcx, __D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<__D> for CachedBody<'tcx>
Source§impl<'tcx, __E: TyEncoder<I = TyCtxt<'tcx>>> Encodable<__E> for CachedBody<'tcx>
impl<'tcx, __E: TyEncoder<I = TyCtxt<'tcx>>> Encodable<__E> for CachedBody<'tcx>
Source§impl<'tcx> FlowistryInput<'tcx, 'tcx> for &'tcx CachedBody<'tcx>
impl<'tcx> FlowistryInput<'tcx, 'tcx> for &'tcx CachedBody<'tcx>
Auto Trait Implementations§
impl<'tcx> !Freeze for CachedBody<'tcx>
impl<'tcx> !RefUnwindSafe for CachedBody<'tcx>
impl<'tcx> Send for CachedBody<'tcx>
impl<'tcx> Sync for CachedBody<'tcx>
impl<'tcx> Unpin for CachedBody<'tcx>
impl<'tcx> !UnwindSafe for CachedBody<'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