fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB33 linesraw
1error[E0381]: used binding `x` isn't initialized
2  --> $DIR/issue-24267-flow-exit.rs:12:20
3   |
4LL |     let x: i32;
5   |         - binding declared here but left uninitialized
6LL |     loop { x = break; }
7LL |     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)
11help: consider assigning a value
12   |
13LL |     let x: i32 = 0;
14   |                +++
15
16error[E0381]: used binding `x` isn't initialized
17  --> $DIR/issue-24267-flow-exit.rs:18:20
18   |
19LL |     let x: i32;
20   |         - binding declared here but left uninitialized
21LL |     for _ in 0..10 { x = continue; }
22LL |     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)
26help: consider assigning a value
27   |
28LL |     let x: i32 = 0;
29   |                +++
30
31error: aborting due to 2 previous errors
32
33For more information about this error, try `rustc --explain E0381`.