Skip to content
/ rust Public
forked from rust-lang/rust

Commit cdaac87

Browse files
committed
Mention the panic function in CheckAlignment
1 parent 2a15bda commit cdaac87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_mir_transform/src/check_alignment.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ fn insert_alignment_check<'tcx>(
240240
required: Operand::Copy(alignment),
241241
found: Operand::Copy(addr),
242242
}),
243-
// The panic symbol that this calls is #[rustc_nounwind]. We never want to insert an
244-
// unwind into unsafe code, because unwinding could make a failing UB check turn into
245-
// much worse UB when we start unwinding.
243+
// This calls panic_misaligned_pointer_dereference, which is #[rustc_nounwind].
244+
// We never want to insert an unwind into unsafe code, because unwinding could
245+
// make a failing UB check turn into much worse UB when we start unwinding.
246246
unwind: UnwindAction::Unreachable,
247247
},
248248
});

0 commit comments

Comments
 (0)