Use IntoIterator
for mk_fn_sig
.
This makes a lot of call sites nicer.
This commit is contained in:
parent
c8237db3ee
commit
2017aeff88
11 changed files with 28 additions and 35 deletions
|
@ -113,7 +113,6 @@ use rustc_target::spec::abi::Abi;
|
|||
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt as _;
|
||||
use rustc_trait_selection::traits::{self, ObligationCause, ObligationCauseCode};
|
||||
|
||||
use std::iter;
|
||||
use std::ops::Not;
|
||||
|
||||
use astconv::AstConv;
|
||||
|
@ -348,7 +347,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) {
|
|||
}
|
||||
|
||||
let se_ty = tcx.mk_fn_ptr(expected_return_type.map_bound(|expected_return_type| {
|
||||
tcx.mk_fn_sig(iter::empty(), expected_return_type, false, hir::Unsafety::Normal, Abi::Rust)
|
||||
tcx.mk_fn_sig([], expected_return_type, false, hir::Unsafety::Normal, Abi::Rust)
|
||||
}));
|
||||
|
||||
require_same_types(
|
||||
|
@ -434,7 +433,7 @@ fn check_start_fn_ty(tcx: TyCtxt<'_>, start_def_id: DefId) {
|
|||
}
|
||||
|
||||
let se_ty = tcx.mk_fn_ptr(ty::Binder::dummy(tcx.mk_fn_sig(
|
||||
[tcx.types.isize, tcx.mk_imm_ptr(tcx.mk_imm_ptr(tcx.types.u8))].iter().cloned(),
|
||||
[tcx.types.isize, tcx.mk_imm_ptr(tcx.mk_imm_ptr(tcx.types.u8))],
|
||||
tcx.types.isize,
|
||||
false,
|
||||
hir::Unsafety::Normal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue