Skip to content

Commit

Permalink
Mention the panic function in CheckAlignment
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Jun 27, 2023
1 parent 2a15bda commit cdaac87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_mir_transform/src/check_alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ fn insert_alignment_check<'tcx>(
required: Operand::Copy(alignment),
found: Operand::Copy(addr),
}),
// The panic symbol that this calls is #[rustc_nounwind]. We never want to insert an
// unwind into unsafe code, because unwinding could make a failing UB check turn into
// much worse UB when we start unwinding.
// This calls panic_misaligned_pointer_dereference, which is #[rustc_nounwind].
// We never want to insert an unwind into unsafe code, because unwinding could
// make a failing UB check turn into much worse UB when we start unwinding.
unwind: UnwindAction::Unreachable,
},
});
Expand Down

0 comments on commit cdaac87

Please sign in to comment.