pub struct ItemCache<'tcx> {
pub def_id: Option<DefId>,
pub full_def: TypeMap<FullDefMapper>,
pub promoteds: TypeMap<PromotedFullDefsMapper>,
pub tys: HashMap<Ty<'tcx>, Ty>,
pub item_refs: HashMap<(RDefId, GenericArgsRef<'tcx>), ItemRef>,
pub predicate_searcher: Option<PredicateSearcher<'tcx>>,
pub impl_exprs: HashMap<PolyTraitRef<'tcx>, ImplExpr>,
}
Expand description
Per-item cache
Fields§
§def_id: Option<DefId>
The translated DefId
.
full_def: TypeMap<FullDefMapper>
The translated definitions, generic in the Body kind.
promoteds: TypeMap<PromotedFullDefsMapper>
The Promoted constants of this body, if any.
tys: HashMap<Ty<'tcx>, Ty>
Cache the Ty
translations.
item_refs: HashMap<(RDefId, GenericArgsRef<'tcx>), ItemRef>
Cache the ItemRef
translations.
predicate_searcher: Option<PredicateSearcher<'tcx>>
Cache the trait resolution engine for each item.
impl_exprs: HashMap<PolyTraitRef<'tcx>, ImplExpr>
Cache of trait refs to resolved impl expressions.
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> Freeze for ItemCache<'tcx>
impl<'tcx> !RefUnwindSafe for ItemCache<'tcx>
impl<'tcx> !Send for ItemCache<'tcx>
impl<'tcx> !Sync for ItemCache<'tcx>
impl<'tcx> Unpin for ItemCache<'tcx>
impl<'tcx> !UnwindSafe for ItemCache<'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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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