Skip to content

Commit 1afc5fd

Browse files
committedJul 20, 2024
Auto merge of #127998 - matthiaskrgr:rollup-ykp0h5r, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #123196 (Add Process support for UEFI) - #127556 (Replace a long inline "autoref" comment with method docs) - #127693 (Migrate `crate-hash-rustc-version` to `rmake`) - #127866 (Conditionally build `wasm-component-ld` ) - #127918 (Safely enforce thread name requirements) - #127948 (fixes panic error `index out of bounds` in conflicting error) - #127980 (Avoid ref when using format! in compiler) - #127984 (Avoid ref when using format! in src) - #127987 (More accurate suggestion for `-> Box<dyn Trait>` or `-> impl Trait`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 41ff460 + 89798e9 commit 1afc5fd

File tree

53 files changed

+1296
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1296
-294
lines changed
 

‎compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,15 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
456456
if let Some(def_id) = def_id
457457
&& self.infcx.tcx.def_kind(def_id).is_fn_like()
458458
&& let Some(pos) = args.iter().position(|arg| arg.hir_id == expr.hir_id)
459-
&& let ty::Param(_) =
460-
self.infcx.tcx.fn_sig(def_id).skip_binder().skip_binder().inputs()
461-
[pos + offset]
462-
.kind()
459+
&& let Some(arg) = self
460+
.infcx
461+
.tcx
462+
.fn_sig(def_id)
463+
.skip_binder()
464+
.skip_binder()
465+
.inputs()
466+
.get(pos + offset)
467+
&& let ty::Param(_) = arg.kind()
463468
{
464469
let place = &self.move_data.move_paths[mpi].place;
465470
let ty = place.ty(self.body, self.infcx.tcx).ty;

‎compiler/rustc_codegen_cranelift/src/abi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
505505
let nop_inst = fx.bcx.ins().nop();
506506
fx.add_comment(
507507
nop_inst,
508-
format!("virtual call; self arg pass mode: {:?}", &fn_abi.args[0]),
508+
format!("virtual call; self arg pass mode: {:?}", fn_abi.args[0]),
509509
);
510510
}
511511

0 commit comments

Comments
 (0)
Please sign in to comment.