]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/two-phase-control-flow-split-before-activation.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / two-phase-control-flow-split-before-activation.rs
1 // run-pass
2
3 fn main() {
4     let mut a = 0;
5     let mut b = 0;
6     let p = if maybe() {
7         &mut a
8     } else {
9         &mut b
10     };
11     use_(p);
12 }
13
14 fn maybe() -> bool { false }
15 fn use_<T>(_: T) { }