]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/const_prop/boxes.rs
New upstream version 1.75.0+dfsg1
[rustc.git] / tests / mir-opt / const_prop / boxes.rs
1 // skip-filecheck
2 // unit-test: ConstProp
3 // compile-flags: -O
4 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
5
6 #![feature(rustc_attrs, stmt_expr_attributes)]
7
8 // Note: this test verifies that we, in fact, do not const prop `#[rustc_box]`
9
10 // EMIT_MIR boxes.main.ConstProp.diff
11 fn main() {
12 let x = *(#[rustc_box]
13 Box::new(42))
14 + 0;
15 }