]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-while.stderr
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / borrowck / borrowck-while.stderr
1 error[E0381]: used binding `x` is possibly-uninitialized
2   --> $DIR/borrowck-while.rs:4:12
3    |
4 LL |     let mut x: isize;
5    |         ----- binding declared here but left uninitialized
6 LL |     while 1 == 1 { x = 10; }
7    |           ------ if this condition isn't met and the `while` loop runs 0 times, `x` is not initialized
8 LL |     return x;
9    |            ^ `x` used here but it is possibly-uninitialized
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0381`.