about summary refs log tree commit diff
path: root/tests/ui/consts/control-flow/drop-precise.rs
blob: 9f42d3351875b3f629e5d8bc39d86453299cc4d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ 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() {}