[−][src]Struct rustc_middle::ty::CtxtInterners

pub struct CtxtInterners<'tcx> {
    arena: &'tcx WorkerLocal<Arena<'tcx>>,
    type_: ShardedHashMap<Interned<'tcx, TyS<'tcx>>, ()>,
    type_list: ShardedHashMap<Interned<'tcx, List<Ty<'tcx>>>, ()>,
    substs: ShardedHashMap<Interned<'tcx, InternalSubsts<'tcx>>, ()>,
    canonical_var_infos: ShardedHashMap<Interned<'tcx, List<CanonicalVarInfo<'tcx>>>, ()>,
    region: ShardedHashMap<Interned<'tcx, RegionKind>, ()>,
    existential_predicates: ShardedHashMap<Interned<'tcx, List<ExistentialPredicate<'tcx>>>, ()>,
    predicate: ShardedHashMap<Interned<'tcx, PredicateInner<'tcx>>, ()>,
    predicates: ShardedHashMap<Interned<'tcx, List<Predicate<'tcx>>>, ()>,
    projs: ShardedHashMap<Interned<'tcx, List<ProjectionKind>>, ()>,
    place_elems: ShardedHashMap<Interned<'tcx, List<PlaceElem<'tcx>>>, ()>,
    const_: ShardedHashMap<Interned<'tcx, Const<'tcx>>, ()>,
}

Fields

arena: &'tcx WorkerLocal<Arena<'tcx>>

The arena that types, regions, etc. are allocated from.

type_: ShardedHashMap<Interned<'tcx, TyS<'tcx>>, ()>

Specifically use a speedy hash algorithm for these hash sets, since they're accessed quite often.

type_list: ShardedHashMap<Interned<'tcx, List<Ty<'tcx>>>, ()>substs: ShardedHashMap<Interned<'tcx, InternalSubsts<'tcx>>, ()>canonical_var_infos: ShardedHashMap<Interned<'tcx, List<CanonicalVarInfo<'tcx>>>, ()>region: ShardedHashMap<Interned<'tcx, RegionKind>, ()>existential_predicates: ShardedHashMap<Interned<'tcx, List<ExistentialPredicate<'tcx>>>, ()>predicate: ShardedHashMap<Interned<'tcx, PredicateInner<'tcx>>, ()>predicates: ShardedHashMap<Interned<'tcx, List<Predicate<'tcx>>>, ()>projs: ShardedHashMap<Interned<'tcx, List<ProjectionKind>>, ()>place_elems: ShardedHashMap<Interned<'tcx, List<PlaceElem<'tcx>>>, ()>const_: ShardedHashMap<Interned<'tcx, Const<'tcx>>, ()>

Implementations

impl<'tcx> CtxtInterners<'tcx>[src]

pub(in ty::context) fn new(
    arena: &'tcx WorkerLocal<Arena<'tcx>>
) -> CtxtInterners<'tcx>
[src]

pub(in ty::context) fn intern_ty(
    &self,
    kind: TyKind<'tcx>
) -> Ty<'tcx>
[src]

Interns a type.

pub(in ty::context) fn intern_predicate(
    &self,
    kind: PredicateKind<'tcx>
) -> &'tcx PredicateInner<'tcx>
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]