Skip to content

Commit 3724e37

Browse files
committed
Remove special treatment for _intern_canonical_var_infos.
This is a leftover from when there were global and thread-local arenas.
1 parent e9d54e1 commit 3724e37

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/librustc/ty/context.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -2217,27 +2217,14 @@ macro_rules! slice_interners {
22172217
slice_interners!(
22182218
type_list: _intern_type_list(Ty<'tcx>),
22192219
substs: _intern_substs(GenericArg<'tcx>),
2220+
canonical_var_infos: _intern_canonical_var_infos(CanonicalVarInfo),
22202221
existential_predicates: _intern_existential_predicates(ExistentialPredicate<'tcx>),
22212222
predicates: _intern_predicates(Predicate<'tcx>),
22222223
clauses: _intern_clauses(Clause<'tcx>),
22232224
goal_list: _intern_goals(Goal<'tcx>),
22242225
projs: _intern_projs(ProjectionKind)
22252226
);
22262227

2227-
// This isn't a perfect fit: `CanonicalVarInfo` slices are always
2228-
// allocated in the global arena, so this `intern_method!` macro is
2229-
// overly general. However, we just return `false` for the code that checks
2230-
// whether they belong in the thread-local arena, so no harm done, and
2231-
// seems better than open-coding the rest.
2232-
intern_method! {
2233-
'tcx,
2234-
canonical_var_infos: _intern_canonical_var_infos(
2235-
&[CanonicalVarInfo],
2236-
|a, v| List::from_arena(a, v),
2237-
Deref::deref
2238-
) -> List<CanonicalVarInfo>
2239-
}
2240-
22412228
impl<'tcx> TyCtxt<'tcx> {
22422229
/// Given a `fn` type, returns an equivalent `unsafe fn` type;
22432230
/// that is, a `fn` type that is equivalent in every way for being

0 commit comments

Comments
 (0)