]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-if-with-else.rs
Rollup merge of #102281 - RalfJung:invalid-enums, r=cjgillot
[rust.git] / src / test / ui / borrowck / borrowck-if-with-else.rs
1 fn foo(x: isize) { println!("{}", x); }
2
3 fn main() {
4     let x: isize;
5     if 1 > 2 {
6         println!("whoops");
7     } else {
8         x = 10;
9     }
10     foo(x); //~ ERROR E0381
11 }