Skip to content

Commit 48c1641

Browse files
committed
nit picks from review
1 parent b9d5a6b commit 48c1641

File tree

1 file changed

+3
-6
lines changed
  • compiler/rustc_hir_typeck/src/fn_ctxt

1 file changed

+3
-6
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use rustc_hir_analysis::astconv::AstConv;
2121
use rustc_hir_analysis::check::intrinsicck::InlineAsmCtxt;
2222
use rustc_hir_analysis::check::potentially_plural_count;
2323
use rustc_hir_analysis::structured_errors::StructuredDiagnostic;
24-
use rustc_index::vec::{Idx, IndexVec};
24+
use rustc_index::vec::IndexVec;
2525
use rustc_infer::infer::error_reporting::{FailureCode, ObligationCauseExt};
2626
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
2727
use rustc_infer::infer::TypeTrace;
@@ -963,14 +963,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
963963
.map_or(true, |next_error| !matches!(next_error, Error::Extra(_)))
964964
{
965965
let next = provided_arg_tys
966-
.get(arg_idx.plus(1))
966+
.get(arg_idx + 1)
967967
.map(|&(_, sp)| sp)
968968
.unwrap_or_else(|| {
969969
// Subtract one to move before `)`
970-
call_expr
971-
.span
972-
.shrink_to_hi()
973-
.with_lo(call_expr.span.hi() - BytePos(1))
970+
call_expr.span.with_lo(call_expr.span.hi() - BytePos(1))
974971
});
975972

976973
// Include next comma

0 commit comments

Comments
 (0)