From 9f241b3a26b9344e061094052ecd67a3bde4b2e1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 21 Dec 2022 13:49:48 +0100 Subject: abort immediately on bad mem::zeroed/uninit --- compiler/rustc_monomorphize/src/collector.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_monomorphize/src') diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index deeeb9af4eb..59cc500a99d 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -843,7 +843,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> { mir::TerminatorKind::Abort { .. } => { let instance = Instance::mono( tcx, - tcx.require_lang_item(LangItem::PanicNoUnwind, Some(source)), + tcx.require_lang_item(LangItem::PanicCannotUnwind, Some(source)), ); if should_codegen_locally(tcx, &instance) { self.output.push(create_fn_mono_item(tcx, instance, source)); -- cgit 1.4.1-3-g733a5