Skip to content

Commit

Permalink
Tell MirUsedCollector that the pointer alignment checks calls its pan…
Browse files Browse the repository at this point in the history
…ic symbol
  • Loading branch information
saethlin committed Dec 7, 2023
1 parent f32d298 commit aa9ae20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_monomorphize/src/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
mir::TerminatorKind::Assert { ref msg, .. } => {
let lang_item = match &**msg {
mir::AssertKind::BoundsCheck { .. } => LangItem::PanicBoundsCheck,
mir::AssertKind::MisalignedPointerDereference { .. } => LangItem::PanicMisalignedPointerDereference,
_ => LangItem::Panic,
};
push_mono_lang_item(self, lang_item);
Expand Down

0 comments on commit aa9ae20

Please sign in to comment.