@@ -15,8 +15,6 @@ use rustc_middle::ty::{self, TyCtxt};
15
15
use rustc_span:: symbol:: { kw, sym, Symbol } ;
16
16
use rustc_target:: spec:: abi:: Abi ;
17
17
18
- use std:: iter;
19
-
20
18
fn equate_intrinsic_type < ' tcx > (
21
19
tcx : TyCtxt < ' tcx > ,
22
20
it : & hir:: ForeignItem < ' _ > ,
@@ -385,14 +383,14 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
385
383
kw:: Try => {
386
384
let mut_u8 = tcx. mk_mut_ptr ( tcx. types . u8 ) ;
387
385
let try_fn_ty = ty:: Binder :: dummy ( tcx. mk_fn_sig (
388
- iter :: once ( mut_u8) ,
386
+ [ mut_u8] ,
389
387
tcx. mk_unit ( ) ,
390
388
false ,
391
389
hir:: Unsafety :: Normal ,
392
390
Abi :: Rust ,
393
391
) ) ;
394
392
let catch_fn_ty = ty:: Binder :: dummy ( tcx. mk_fn_sig (
395
- [ mut_u8, mut_u8] . iter ( ) . cloned ( ) ,
393
+ [ mut_u8, mut_u8] ,
396
394
tcx. mk_unit ( ) ,
397
395
false ,
398
396
hir:: Unsafety :: Normal ,
@@ -447,7 +445,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
447
445
} ;
448
446
( n_tps, 0 , inputs, output, unsafety)
449
447
} ;
450
- let sig = tcx. mk_fn_sig ( inputs. into_iter ( ) , output, false , unsafety, Abi :: RustIntrinsic ) ;
448
+ let sig = tcx. mk_fn_sig ( inputs, output, false , unsafety, Abi :: RustIntrinsic ) ;
451
449
let sig = ty:: Binder :: bind_with_vars ( sig, bound_vars) ;
452
450
equate_intrinsic_type ( tcx, it, n_tps, n_lts, sig)
453
451
}
@@ -545,13 +543,7 @@ pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>)
545
543
}
546
544
} ;
547
545
548
- let sig = tcx. mk_fn_sig (
549
- inputs. into_iter ( ) ,
550
- output,
551
- false ,
552
- hir:: Unsafety :: Unsafe ,
553
- Abi :: PlatformIntrinsic ,
554
- ) ;
546
+ let sig = tcx. mk_fn_sig ( inputs, output, false , hir:: Unsafety :: Unsafe , Abi :: PlatformIntrinsic ) ;
555
547
let sig = ty:: Binder :: dummy ( sig) ;
556
548
equate_intrinsic_type ( tcx, it, n_tps, 0 , sig)
557
549
}
0 commit comments