correctly intern List<Const<'tcx>>
This commit is contained in:
parent
5a496aab03
commit
95e1a39c04
@ -137,6 +137,7 @@ pub struct CtxtInterners<'tcx> {
|
|||||||
// Specifically use a speedy hash algorithm for these hash sets, since
|
// Specifically use a speedy hash algorithm for these hash sets, since
|
||||||
// they're accessed quite often.
|
// they're accessed quite often.
|
||||||
type_: InternedSet<'tcx, WithStableHash<TyS<'tcx>>>,
|
type_: InternedSet<'tcx, WithStableHash<TyS<'tcx>>>,
|
||||||
|
const_lists: InternedSet<'tcx, List<ty::Const<'tcx>>>,
|
||||||
substs: InternedSet<'tcx, InternalSubsts<'tcx>>,
|
substs: InternedSet<'tcx, InternalSubsts<'tcx>>,
|
||||||
canonical_var_infos: InternedSet<'tcx, List<CanonicalVarInfo<'tcx>>>,
|
canonical_var_infos: InternedSet<'tcx, List<CanonicalVarInfo<'tcx>>>,
|
||||||
region: InternedSet<'tcx, RegionKind<'tcx>>,
|
region: InternedSet<'tcx, RegionKind<'tcx>>,
|
||||||
@ -157,6 +158,7 @@ impl<'tcx> CtxtInterners<'tcx> {
|
|||||||
CtxtInterners {
|
CtxtInterners {
|
||||||
arena,
|
arena,
|
||||||
type_: Default::default(),
|
type_: Default::default(),
|
||||||
|
const_lists: Default::default(),
|
||||||
substs: Default::default(),
|
substs: Default::default(),
|
||||||
region: Default::default(),
|
region: Default::default(),
|
||||||
poly_existential_predicates: Default::default(),
|
poly_existential_predicates: Default::default(),
|
||||||
@ -2261,6 +2263,7 @@ macro_rules! slice_interners {
|
|||||||
}
|
}
|
||||||
|
|
||||||
slice_interners!(
|
slice_interners!(
|
||||||
|
const_lists: _intern_const_list(Const<'tcx>),
|
||||||
substs: _intern_substs(GenericArg<'tcx>),
|
substs: _intern_substs(GenericArg<'tcx>),
|
||||||
canonical_var_infos: _intern_canonical_var_infos(CanonicalVarInfo<'tcx>),
|
canonical_var_infos: _intern_canonical_var_infos(CanonicalVarInfo<'tcx>),
|
||||||
poly_existential_predicates:
|
poly_existential_predicates:
|
||||||
@ -2722,7 +2725,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn intern_const_list(self, cs: &[ty::Const<'tcx>]) -> &'tcx List<ty::Const<'tcx>> {
|
pub fn intern_const_list(self, cs: &[ty::Const<'tcx>]) -> &'tcx List<ty::Const<'tcx>> {
|
||||||
if cs.is_empty() { List::empty() } else { List::from_arena(self.arena, cs) }
|
if cs.is_empty() { List::empty() } else { self._intern_const_list(cs) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn intern_type_list(self, ts: &[Ty<'tcx>]) -> &'tcx List<Ty<'tcx>> {
|
pub fn intern_type_list(self, ts: &[Ty<'tcx>]) -> &'tcx List<Ty<'tcx>> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user