2019-07-03 07:25:27 -05:00
|
|
|
// check that we don't forget to drop the Box if we early return before
|
|
|
|
// initializing it
|
2019-10-18 16:47:54 -05:00
|
|
|
// ignore-wasm32-bare compiled with panic=abort by default
|
2019-07-03 07:25:27 -05:00
|
|
|
|
2023-02-27 07:07:44 -06:00
|
|
|
#![feature(rustc_attrs)]
|
2019-07-03 07:25:27 -05:00
|
|
|
|
2020-07-27 14:22:43 -05:00
|
|
|
// EMIT_MIR issue_62289.test.ElaborateDrops.before.mir
|
2019-07-03 07:25:27 -05:00
|
|
|
fn test() -> Option<Box<u32>> {
|
2023-02-27 07:07:44 -06:00
|
|
|
Some(
|
|
|
|
#[rustc_box]
|
|
|
|
Box::new(None?),
|
|
|
|
)
|
2019-07-03 07:25:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
test();
|
|
|
|
}
|