From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/mir-opt/const_prop/boxes.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/mir-opt/const_prop/boxes.rs (limited to 'tests/mir-opt/const_prop/boxes.rs') diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs new file mode 100644 index 000000000..d287830db --- /dev/null +++ b/tests/mir-opt/const_prop/boxes.rs @@ -0,0 +1,14 @@ +// unit-test: ConstProp +// compile-flags: -O +// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32 +// ignore-wasm64 + +#![feature(box_syntax)] + +// Note: this test verifies that we, in fact, do not const prop `box` + +// EMIT_MIR boxes.main.ConstProp.diff +fn main() { + let x = *(box 42) + 0; +} -- cgit v1.2.3