File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ use middle::def;
30
30
use middle:: lang_items;
31
31
use middle:: subst;
32
32
use middle:: ty:: { ImplContainer , TraitContainer } ;
33
- use middle:: ty:: { self , Ty } ;
33
+ use middle:: ty:: { self , RegionEscape , Ty } ;
34
34
use util:: nodemap:: FnvHashMap ;
35
35
36
36
use std:: cell:: { Cell , RefCell } ;
@@ -477,7 +477,13 @@ pub fn get_adt_def<'tcx>(intr: &IdentInterner,
477
477
variant. name,
478
478
ctor_ty) ;
479
479
let field_tys = match ctor_ty. sty {
480
- ty:: TyBareFn ( _, ref f) => & f. sig . skip_binder ( ) . inputs ,
480
+ ty:: TyBareFn ( _, & ty:: BareFnTy { sig : ty:: Binder ( ty:: FnSig {
481
+ ref inputs, ..
482
+ } ) , ..} ) => {
483
+ // tuple-struct constructors don't have escaping regions
484
+ assert ! ( !inputs. has_escaping_regions( ) ) ;
485
+ inputs
486
+ } ,
481
487
_ => tcx. sess . bug ( "tuple-variant ctor is not an ADT" )
482
488
} ;
483
489
for ( field, & ty) in variant. fields . iter ( ) . zip ( field_tys. iter ( ) ) {
You can’t perform that action at this time.
0 commit comments