]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-if-with-else.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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 }