File tree 1 file changed +3
-18
lines changed
1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ pub(crate) fn sty_in_local_arena(st: &ty::TypeVariants) -> bool {
317
317
ty:: ExistentialPredicate :: AutoTrait ( _) => { }
318
318
}
319
319
}
320
- region_in_local_arena ( r )
320
+ r . keep_in_local_tcx ( )
321
321
}
322
322
323
323
ty:: TyArray ( tt, len) => {
@@ -334,7 +334,7 @@ pub(crate) fn sty_in_local_arena(st: &ty::TypeVariants) -> bool {
334
334
}
335
335
336
336
ty:: TyRef ( r, ref m) => {
337
- region_in_local_arena ( r ) ||
337
+ r . keep_in_local_tcx ( ) ||
338
338
ty_in_local_arena ( m. ty )
339
339
}
340
340
@@ -367,21 +367,6 @@ fn tys_in_local_arena(tys: &[Ty]) -> bool {
367
367
false
368
368
}
369
369
370
- fn region_in_local_arena ( r : ty:: Region ) -> bool {
371
- match * r {
372
- ty:: ReVar ( ..) | ty:: ReSkolemized ( ..) => true ,
373
- ty:: ReLateBound ( ..) |
374
- ty:: ReEarlyBound ( ..) |
375
- ty:: ReEmpty |
376
- ty:: ReStatic |
377
- ty:: ReFree { .. } |
378
- ty:: ReScope { .. } |
379
- ty:: ReErased |
380
- ty:: ReCanonical ( ..) |
381
- ty:: ReClosureBound ( ..) => false
382
- }
383
- }
384
-
385
370
#[ inline( always) ]
386
371
fn const_in_local_arena ( constant : & ty:: Const ) -> bool {
387
372
if ty_in_local_arena ( constant. ty ) {
@@ -401,7 +386,7 @@ fn substs_in_local_arena(substs: &Substs) -> bool {
401
386
}
402
387
403
388
for r in substs. regions ( ) {
404
- if region_in_local_arena ( r ) {
389
+ if r . keep_in_local_tcx ( ) {
405
390
return true ;
406
391
}
407
392
}
You can’t perform that action at this time.
0 commit comments