Skip to content

Commit dfec3c0

Browse files
committed
Use rustc_middle::ty::FnSig::inputs
1 parent 420b986 commit dfec3c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_lint/src/internal.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ fn check_into_iter_stability<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx
143143
return;
144144
};
145145
let fn_sig = cx.tcx.fn_sig(callee_def_id).instantiate_identity().skip_binder();
146-
let (_, inputs) = fn_sig.inputs_and_output.as_slice().split_last().unwrap();
147-
for (arg_index, &input) in inputs.iter().enumerate() {
146+
for (arg_index, &input) in fn_sig.inputs().iter().enumerate() {
148147
let &ty::Param(ParamTy { index: param_index, .. }) = input.kind() else {
149148
continue;
150149
};

0 commit comments

Comments
 (0)