2022-07-26 17:04:27 +00:00
|
|
|
// unit-test: ConstProp
|
2019-09-15 16:03:52 +00:00
|
|
|
// compile-flags: -O
|
|
|
|
// ignore-emscripten compiled with panic=abort by default
|
2023-06-08 07:18:34 +00:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2019-09-15 16:03:52 +00:00
|
|
|
// ignore-wasm64
|
|
|
|
|
2023-02-27 13:07:44 +00:00
|
|
|
#![feature(rustc_attrs, stmt_expr_attributes)]
|
2019-09-15 16:03:52 +00:00
|
|
|
|
2023-02-27 13:07:44 +00:00
|
|
|
// Note: this test verifies that we, in fact, do not const prop `#[rustc_box]`
|
2019-09-15 16:03:52 +00:00
|
|
|
|
2020-07-27 19:22:43 +00:00
|
|
|
// EMIT_MIR boxes.main.ConstProp.diff
|
2019-09-15 16:03:52 +00:00
|
|
|
fn main() {
|
2023-02-27 13:07:44 +00:00
|
|
|
let x = *(#[rustc_box]
|
|
|
|
Box::new(42))
|
|
|
|
+ 0;
|
2019-09-15 16:03:52 +00:00
|
|
|
}
|