@@ -173,10 +173,10 @@ impl<'gcx: 'tcx, 'tcx> CtxtInterners<'tcx> {
173
173
return ty;
174
174
}
175
175
let global_interner = global_interners. map ( |interners| {
176
- interners. type_ . borrow_mut ( )
176
+ ( interners. type_ . borrow_mut ( ) , & interners . arena )
177
177
} ) ;
178
- if let Some ( ref interner ) = global_interner {
179
- if let Some ( & Interned ( ty) ) = interner . get ( & st) {
178
+ if let Some ( ( ref type_ , _ ) ) = global_interner {
179
+ if let Some ( & Interned ( ty) ) = type_ . get ( & st) {
180
180
return ty;
181
181
}
182
182
}
@@ -192,18 +192,18 @@ impl<'gcx: 'tcx, 'tcx> CtxtInterners<'tcx> {
192
192
// determine that all contents are in the global tcx.
193
193
// See comments on Lift for why we can't use that.
194
194
if !flags. flags . intersects ( ty:: TypeFlags :: KEEP_IN_LOCAL_TCX ) {
195
- if let Some ( interner ) = global_interners {
195
+ if let Some ( ( mut type_ , arena ) ) = global_interner {
196
196
let ty_struct: TyS < ' gcx > = unsafe {
197
197
mem:: transmute ( ty_struct)
198
198
} ;
199
- let ty: Ty < ' gcx > = interner . arena . alloc ( ty_struct) ;
200
- global_interner . unwrap ( ) . insert ( Interned ( ty) ) ;
199
+ let ty: Ty < ' gcx > = arena. alloc ( ty_struct) ;
200
+ type_ . insert ( Interned ( ty) ) ;
201
201
return ty;
202
202
}
203
203
} else {
204
204
// Make sure we don't end up with inference
205
205
// types/regions in the global tcx.
206
- if global_interners . is_none ( ) {
206
+ if global_interner . is_none ( ) {
207
207
drop ( interner) ;
208
208
bug ! ( "Attempted to intern `{:?}` which contains \
209
209
inference types/regions in the global type context",
0 commit comments