@@ -173,10 +173,10 @@ impl<'gcx: 'tcx, 'tcx> CtxtInterners<'tcx> {
173173 return ty;
174174 }
175175 let global_interner = global_interners. map ( |interners| {
176- interners. type_ . borrow_mut ( )
176+ ( interners. type_ . borrow_mut ( ) , & interners . arena )
177177 } ) ;
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) {
180180 return ty;
181181 }
182182 }
@@ -192,18 +192,18 @@ impl<'gcx: 'tcx, 'tcx> CtxtInterners<'tcx> {
192192 // determine that all contents are in the global tcx.
193193 // See comments on Lift for why we can't use that.
194194 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 {
196196 let ty_struct: TyS < ' gcx > = unsafe {
197197 mem:: transmute ( ty_struct)
198198 } ;
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) ) ;
201201 return ty;
202202 }
203203 } else {
204204 // Make sure we don't end up with inference
205205 // types/regions in the global tcx.
206- if global_interners . is_none ( ) {
206+ if global_interner . is_none ( ) {
207207 drop ( interner) ;
208208 bug ! ( "Attempted to intern `{:?}` which contains \
209209 inference types/regions in the global type context",
0 commit comments