about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/const_eval
diff options
context:
space:
mode:
authorSmitty <me@smitop.com>2021-07-02 16:06:12 -0400
committerSmitty <me@smitop.com>2021-07-02 16:06:12 -0400
commite9d69d9f8eb888a6e124c567f804c2e464c7b00a (patch)
treecda4f0d2606eec333af0c4eba1a9e1962847ea6e /compiler/rustc_mir/src/const_eval
parent3e20129a18b34ba3aa13efaa53ddfa09dfb1fb7b (diff)
downloadrust-e9d69d9f8eb888a6e124c567f804c2e464c7b00a.tar.gz
rust-e9d69d9f8eb888a6e124c567f804c2e464c7b00a.zip
Allocation failure in constprop panics right away
Diffstat (limited to 'compiler/rustc_mir/src/const_eval')
-rw-r--r--compiler/rustc_mir/src/const_eval/machine.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_mir/src/const_eval/machine.rs b/compiler/rustc_mir/src/const_eval/machine.rs
index ddc87084e9f..992e32e298f 100644
--- a/compiler/rustc_mir/src/const_eval/machine.rs
+++ b/compiler/rustc_mir/src/const_eval/machine.rs
@@ -201,6 +201,8 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
 
     type MemoryExtra = MemoryExtra;
 
+    const PANIC_ON_ALLOC_FAIL: bool = false; // will be raised as a proper error
+
     fn load_mir(
         ecx: &InterpCx<'mir, 'tcx, Self>,
         instance: ty::InstanceDef<'tcx>,