@@ -15,8 +15,6 @@ use rustc_middle::ty::{self, TyCtxt};
1515use rustc_span:: symbol:: { kw, sym, Symbol } ;
1616use rustc_target:: spec:: abi:: Abi ;
1717
18- use std:: iter;
19-
2018fn equate_intrinsic_type < ' tcx > (
2119 tcx : TyCtxt < ' tcx > ,
2220 it : & hir:: ForeignItem < ' _ > ,
@@ -385,14 +383,14 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
385383 kw:: Try => {
386384 let mut_u8 = tcx. mk_mut_ptr ( tcx. types . u8 ) ;
387385 let try_fn_ty = ty:: Binder :: dummy ( tcx. mk_fn_sig (
388- iter :: once ( mut_u8) ,
386+ [ mut_u8] ,
389387 tcx. mk_unit ( ) ,
390388 false ,
391389 hir:: Unsafety :: Normal ,
392390 Abi :: Rust ,
393391 ) ) ;
394392 let catch_fn_ty = ty:: Binder :: dummy ( tcx. mk_fn_sig (
395- [ mut_u8, mut_u8] . iter ( ) . cloned ( ) ,
393+ [ mut_u8, mut_u8] ,
396394 tcx. mk_unit ( ) ,
397395 false ,
398396 hir:: Unsafety :: Normal ,
@@ -447,7 +445,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>) {
447445 } ;
448446 ( n_tps, 0 , inputs, output, unsafety)
449447 } ;
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 ) ;
451449 let sig = ty:: Binder :: bind_with_vars ( sig, bound_vars) ;
452450 equate_intrinsic_type ( tcx, it, n_tps, n_lts, sig)
453451}
@@ -545,13 +543,7 @@ pub fn check_platform_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem<'_>)
545543 }
546544 } ;
547545
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 ) ;
555547 let sig = ty:: Binder :: dummy ( sig) ;
556548 equate_intrinsic_type ( tcx, it, n_tps, 0 , sig)
557549}
0 commit comments