Rollup merge of #112669 - Nilstrieb:typo, r=jyn514

Fix comment for ptr alignment checks in codegen
This commit is contained in:
Guillaume Gomez 2023-06-15 22:04:58 +02:00 committed by GitHub
commit 05d5449522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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])
}