]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/borrowck/issue-24267-flow-exit.stderr
Rollup merge of #101675 - beetrees:set-times-no-panic, r=joshtriplett
[rust.git] / src / test / ui / borrowck / issue-24267-flow-exit.stderr
index b85e8f216e5df0e28a3704cb4674f2550fed3077..58d1c8c0f73ad4b0851db87d98f745a054e7cf98 100644 (file)
@@ -8,6 +8,10 @@ LL |     println!("{}", x);
    |                    ^ `x` used here but it isn't initialized
    |
    = 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)
+help: consider assigning a value
+   |
+LL |     let x: i32 = 0;
+   |                +++
 
 error[E0381]: used binding `x` isn't initialized
   --> $DIR/issue-24267-flow-exit.rs:18:20
@@ -19,6 +23,10 @@ LL |     println!("{}", x);
    |                    ^ `x` used here but it isn't initialized
    |
    = 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)
+help: consider assigning a value
+   |
+LL |     let x: i32 = 0;
+   |                +++
 
 error: aborting due to 2 previous errors