1 // Basic test for liveness constraints: the region (`R1`) that appears
2 // in the type of `p` includes the points after `&v[0]` up to (but not
3 // including) the call to `use_x`. The `else` branch is not included.
5 // compile-flags:-Zborrowck=mir -Zverbose
6 // ^^^^^^^^^ force compiler to dump more region information
10 fn use_x(_: usize) -> bool { true }
13 let mut v = [1, 2, 3];
24 // START rustc.main.nll.0.mir
25 // | '_#2r | U0 | {bb2[0..=8], bb3[0], bb6[0..=1]}
26 // | '_#3r | U0 | {bb2[1..=8], bb3[0], bb6[0..=1]}
27 // | '_#4r | U0 | {bb2[4..=8], bb3[0], bb6[0..=1]}
28 // END rustc.main.nll.0.mir
29 // START rustc.main.nll.0.mir
30 // let _2: &'_#3r usize;
32 // let _6: &'_#4r usize;
34 // _2 = &'_#2r _1[_3];
37 // END rustc.main.nll.0.mir