@@ -771,7 +771,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
771
771
}
772
772
773
773
ReifyFnPointer => match self . operand_ty ( operand) . sty {
774
- ty:: TyFnDef ( def_id, substs, _ ) => {
774
+ ty:: TyFnDef ( def_id, substs) => {
775
775
let instance = resolve ( self . tcx , def_id, substs) ;
776
776
let fn_ptr = self . memory . create_fn_alloc ( instance) ;
777
777
self . write_value ( Value :: ByVal ( PrimVal :: Ptr ( fn_ptr) ) , dest, dest_ty) ?;
@@ -1686,7 +1686,7 @@ pub fn eval_main<'a, 'tcx: 'a>(
1686
1686
let main_ptr = ecx. memory . create_fn_alloc ( main_instance) ;
1687
1687
let dest = ecx. eval_lvalue ( & mir:: Lvalue :: Local ( args. next ( ) . unwrap ( ) ) ) ?;
1688
1688
let main_ty = main_instance. def . def_ty ( ecx. tcx ) ;
1689
- let main_ptr_ty = ecx. tcx . mk_fn_ptr ( main_ty. fn_sig ( ) ) ;
1689
+ let main_ptr_ty = ecx. tcx . mk_fn_ptr ( main_ty. fn_sig ( ecx . tcx ) ) ;
1690
1690
ecx. write_value ( Value :: ByVal ( PrimVal :: Ptr ( main_ptr) ) , dest, main_ptr_ty) ?;
1691
1691
1692
1692
// Second argument (argc): 0
@@ -1830,7 +1830,7 @@ fn fn_once_adapter_instance<'a, 'tcx>(
1830
1830
let self_ty = tcx. mk_closure_from_closure_substs (
1831
1831
closure_did, substs) ;
1832
1832
1833
- let sig = tcx. closure_type ( closure_did) . subst ( tcx, substs. substs ) ;
1833
+ let sig = tcx. fn_sig ( closure_did) . subst ( tcx, substs. substs ) ;
1834
1834
let sig = tcx. erase_late_bound_regions_and_normalize ( & sig) ;
1835
1835
assert_eq ! ( sig. inputs( ) . len( ) , 1 ) ;
1836
1836
let substs = tcx. mk_substs ( [
@@ -1891,9 +1891,11 @@ pub fn resolve<'a, 'tcx>(
1891
1891
} else {
1892
1892
let item_type = def_ty ( tcx, def_id, substs) ;
1893
1893
let def = match item_type. sty {
1894
- ty:: TyFnDef ( _, _, f) if
1895
- f. abi ( ) == Abi :: RustIntrinsic ||
1896
- f. abi ( ) == Abi :: PlatformIntrinsic =>
1894
+ ty:: TyFnDef ( ..) if {
1895
+ let f = item_type. fn_sig ( tcx) ;
1896
+ f. abi ( ) == Abi :: RustIntrinsic ||
1897
+ f. abi ( ) == Abi :: PlatformIntrinsic
1898
+ } =>
1897
1899
{
1898
1900
debug ! ( " => intrinsic" ) ;
1899
1901
ty:: InstanceDef :: Intrinsic ( def_id)
0 commit comments