Struct rustc_middle::ty::context::CtxtInterners
source · [−]pub struct CtxtInterners<'tcx> {Show 15 fields
arena: &'tcx WorkerLocal<Arena<'tcx>>,
type_: ShardedHashMap<InternedInSet<'tcx, WithStableHash<TyS<'tcx>>>, ()>,
substs: ShardedHashMap<InternedInSet<'tcx, InternalSubsts<'tcx>>, ()>,
canonical_var_infos: ShardedHashMap<InternedInSet<'tcx, List<CanonicalVarInfo<'tcx>>>, ()>,
region: ShardedHashMap<InternedInSet<'tcx, RegionKind<'tcx>>, ()>,
poly_existential_predicates: ShardedHashMap<InternedInSet<'tcx, List<Binder<'tcx, ExistentialPredicate<'tcx>>>>, ()>,
predicate: ShardedHashMap<InternedInSet<'tcx, PredicateS<'tcx>>, ()>,
predicates: ShardedHashMap<InternedInSet<'tcx, List<Predicate<'tcx>>>, ()>,
projs: ShardedHashMap<InternedInSet<'tcx, List<ProjectionKind>>, ()>,
place_elems: ShardedHashMap<InternedInSet<'tcx, List<PlaceElem<'tcx>>>, ()>,
const_: ShardedHashMap<InternedInSet<'tcx, ConstS<'tcx>>, ()>,
const_allocation: ShardedHashMap<InternedInSet<'tcx, Allocation>, ()>,
bound_variable_kinds: ShardedHashMap<InternedInSet<'tcx, List<BoundVariableKind>>, ()>,
layout: ShardedHashMap<InternedInSet<'tcx, LayoutS<'tcx>>, ()>,
adt_def: ShardedHashMap<InternedInSet<'tcx, AdtDefData>, ()>,
}
Fields
arena: &'tcx WorkerLocal<Arena<'tcx>>
The arena that types, regions, etc. are allocated from.
type_: ShardedHashMap<InternedInSet<'tcx, WithStableHash<TyS<'tcx>>>, ()>
substs: ShardedHashMap<InternedInSet<'tcx, InternalSubsts<'tcx>>, ()>
canonical_var_infos: ShardedHashMap<InternedInSet<'tcx, List<CanonicalVarInfo<'tcx>>>, ()>
region: ShardedHashMap<InternedInSet<'tcx, RegionKind<'tcx>>, ()>
poly_existential_predicates: ShardedHashMap<InternedInSet<'tcx, List<Binder<'tcx, ExistentialPredicate<'tcx>>>>, ()>
predicate: ShardedHashMap<InternedInSet<'tcx, PredicateS<'tcx>>, ()>
predicates: ShardedHashMap<InternedInSet<'tcx, List<Predicate<'tcx>>>, ()>
projs: ShardedHashMap<InternedInSet<'tcx, List<ProjectionKind>>, ()>
place_elems: ShardedHashMap<InternedInSet<'tcx, List<PlaceElem<'tcx>>>, ()>
const_: ShardedHashMap<InternedInSet<'tcx, ConstS<'tcx>>, ()>
const_allocation: ShardedHashMap<InternedInSet<'tcx, Allocation>, ()>
bound_variable_kinds: ShardedHashMap<InternedInSet<'tcx, List<BoundVariableKind>>, ()>
layout: ShardedHashMap<InternedInSet<'tcx, LayoutS<'tcx>>, ()>
adt_def: ShardedHashMap<InternedInSet<'tcx, AdtDefData>, ()>
Implementations
sourceimpl<'tcx> CtxtInterners<'tcx>
impl<'tcx> CtxtInterners<'tcx>
fn new(arena: &'tcx WorkerLocal<Arena<'tcx>>) -> CtxtInterners<'tcx>
sourcefn intern_ty(
&self,
kind: TyKind<'tcx>,
sess: &Session,
definitions: &Definitions,
cstore: &CrateStoreDyn,
source_span: &IndexVec<LocalDefId, Span>
) -> Ty<'tcx>
fn intern_ty(
&self,
kind: TyKind<'tcx>,
sess: &Session,
definitions: &Definitions,
cstore: &CrateStoreDyn,
source_span: &IndexVec<LocalDefId, Span>
) -> Ty<'tcx>
Interns a type.
fn intern_predicate(
&self,
kind: Binder<'tcx, PredicateKind<'tcx>>
) -> Predicate<'tcx>
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for CtxtInterners<'tcx>
impl<'tcx> !Send for CtxtInterners<'tcx>
impl<'tcx> !Sync for CtxtInterners<'tcx>
impl<'tcx> Unpin for CtxtInterners<'tcx>
impl<'tcx> !UnwindSafe for CtxtInterners<'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, R> InternIteratorElement<T, R> for T
impl<T, R> InternIteratorElement<T, R> for T
type Output = R
fn intern_with<I, F>(iter: I, f: F) -> <T as InternIteratorElement<T, R>>::Outputwhere
I: Iterator<Item = T>,
F: FnOnce(&[T]) -> R,
sourceimpl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
sourceimpl<CTX, T> Value<CTX> for Twhere
CTX: DepContext,
impl<CTX, T> Value<CTX> for Twhere
CTX: DepContext,
default fn from_cycle_error(tcx: CTX) -> T
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 568 bytes