Skip to content

Commit

Permalink
Rollup merge of rust-lang#112669 - Nilstrieb:typo, r=jyn514
Browse files Browse the repository at this point in the history
Fix comment for ptr alignment checks in codegen
  • Loading branch information
GuillaumeGomez authored Jun 15, 2023
2 parents 56a5b7e + 465e4d9 commit 05d5449
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/mir/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
AssertKind::MisalignedPointerDereference { ref required, ref found } => {
let required = self.codegen_operand(bx, required).immediate();
let found = self.codegen_operand(bx, found).immediate();
// It's `fn panic_bounds_check(index: usize, len: usize)`,
// It's `fn panic_misaligned_pointer_dereference(required: usize, found: usize)`,
// and `#[track_caller]` adds an implicit third argument.
(LangItem::PanicMisalignedPointerDereference, vec![required, found, location])
}
Expand Down

0 comments on commit 05d5449

Please sign in to comment.