]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/issue-24267-flow-exit.stderr
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / issue-24267-flow-exit.stderr
1 error[E0381]: used binding `x` isn't initialized
2   --> $DIR/issue-24267-flow-exit.rs:12:20
3    |
4 LL |     let x: i32;
5    |         - binding declared here but left uninitialized
6 LL |     loop { x = break; }
7 LL |     println!("{}", x);
8    |                    ^ `x` used here but it isn't initialized
9    |
10    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
11 help: consider assigning a value
12    |
13 LL |     let x: i32 = 0;
14    |                +++
15
16 error[E0381]: used binding `x` isn't initialized
17   --> $DIR/issue-24267-flow-exit.rs:18:20
18    |
19 LL |     let x: i32;
20    |         - binding declared here but left uninitialized
21 LL |     for _ in 0..10 { x = continue; }
22 LL |     println!("{}", x);
23    |                    ^ `x` used here but it isn't initialized
24    |
25    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
26 help: consider assigning a value
27    |
28 LL |     let x: i32 = 0;
29    |                +++
30
31 error: aborting due to 2 previous errors
32
33 For more information about this error, try `rustc --explain E0381`.