Skip to content

Commit aa58ccb

Browse files
committed
Tell MirUsedCollector that the pointer alignment checks calls its panic symbol
1 parent f32d298 commit aa58ccb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_monomorphize/src/collector.rs

+3
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,9 @@ 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 { .. } => {
848+
LangItem::PanicMisalignedPointerDereference
849+
}
847850
_ => LangItem::Panic,
848851
};
849852
push_mono_lang_item(self, lang_item);

0 commit comments

Comments
 (0)