Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aa9ae20

Browse files
committedDec 7, 2023
Tell MirUsedCollector that the pointer alignment checks calls its panic symbol
1 parent f32d298 commit aa9ae20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎compiler/rustc_monomorphize/src/collector.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
844844
mir::TerminatorKind::Assert { ref msg, .. } => {
845845
let lang_item = match &**msg {
846846
mir::AssertKind::BoundsCheck { .. } => LangItem::PanicBoundsCheck,
847+
mir::AssertKind::MisalignedPointerDereference { .. } => LangItem::PanicMisalignedPointerDereference,
847848
_ => LangItem::Panic,
848849
};
849850
push_mono_lang_item(self, lang_item);

0 commit comments

Comments
 (0)
Please sign in to comment.