rust/tests/ui/consts/control-flow/drop-precise.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
305 B
Rust
Raw Normal View History

//@ run-pass
// gate-test-const_precise_live_drops
#![feature(const_precise_live_drops)]
const _: Vec<i32> = {
let vec_tuple = (Vec::new(),);
vec_tuple.0
};
const _: Vec<i32> = {
let x: Result<_, Vec<i32>> = Ok(Vec::new());
match x {
Ok(x) | Err(x) => x,
}
};
fn main() {}