diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-06-22 11:04:36 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-07-07 12:25:56 -0700 |
| commit | 95923d1676f565e6358183d5428513c1803f79c2 (patch) | |
| tree | 367d9fbc100645cda18aefcecdb25d470af908dd /src/test | |
| parent | 9cb1874cd6567b68ee6d3aba60449771cf868d5a (diff) | |
| download | rust-95923d1676f565e6358183d5428513c1803f79c2.tar.gz rust-95923d1676f565e6358183d5428513c1803f79c2.zip | |
Review comments: wording
Diffstat (limited to 'src/test')
10 files changed, 34 insertions, 31 deletions
diff --git a/src/test/ui/async-await/no-non-guaranteed-initialization.stderr b/src/test/ui/async-await/no-non-guaranteed-initialization.stderr index b23e2da0e09..12c15bf56ce 100644 --- a/src/test/ui/async-await/no-non-guaranteed-initialization.stderr +++ b/src/test/ui/async-await/no-non-guaranteed-initialization.stderr @@ -1,13 +1,15 @@ -error[E0381]: used binding `y` isn't initialized in all conditions +error[E0381]: used binding `y` is possibly-uninitialized --> $DIR/no-non-guaranteed-initialization.rs:9:5 | LL | let y; | - binding declared here but left uninitialized LL | if x > 5 { - | ----- this `if` expression might be missing an `else` arm that initializes `y` -... + | ----- if this `if` condition is `false`, `y` is not initialized +LL | y = echo(10).await; +LL | } + | - an `else` arm might be missing here, initializing `y` LL | y - | ^ `y` used here but it isn't initialized in all conditions + | ^ `y` used here but it is possibly-uninitialized error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-and-init.stderr b/src/test/ui/borrowck/borrowck-and-init.stderr index a78ac1e593a..7f3d27d6091 100644 --- a/src/test/ui/borrowck/borrowck-and-init.stderr +++ b/src/test/ui/borrowck/borrowck-and-init.stderr @@ -1,4 +1,4 @@ -error[E0381]: used binding `i` isn't initialized in all conditions +error[E0381]: used binding `i` is possibly-uninitialized --> $DIR/borrowck-and-init.rs:5:20 | LL | let i: isize; @@ -7,7 +7,7 @@ LL | LL | println!("{}", false && { i = 5; true }); | ----- binding initialized here in some conditions LL | println!("{}", i); - | ^ `i` used here but it isn't initialized in all conditions + | ^ `i` used here but it is possibly-uninitialized | = note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/borrowck/borrowck-if-no-else.stderr b/src/test/ui/borrowck/borrowck-if-no-else.stderr index 134e7d5df4b..9eafc2c2a86 100644 --- a/src/test/ui/borrowck/borrowck-if-no-else.stderr +++ b/src/test/ui/borrowck/borrowck-if-no-else.stderr @@ -1,12 +1,13 @@ -error[E0381]: used binding `x` isn't initialized in all conditions +error[E0381]: used binding `x` is possibly-uninitialized --> $DIR/borrowck-if-no-else.rs:5:9 | LL | let x: isize; if 1 > 2 { x = 10; } - | - ----- this `if` expression might be missing an `else` arm that initializes `x` - | | + | - ----- - an `else` arm might be missing here, initializing `x` + | | | + | | if this `if` condition is `false`, `x` is not initialized | binding declared here but left uninitialized LL | foo(x); - | ^ `x` used here but it isn't initialized in all conditions + | ^ `x` used here but it is possibly-uninitialized error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-if-with-else.stderr b/src/test/ui/borrowck/borrowck-if-with-else.stderr index f4b0c393074..3f0fe291ca2 100644 --- a/src/test/ui/borrowck/borrowck-if-with-else.stderr +++ b/src/test/ui/borrowck/borrowck-if-with-else.stderr @@ -1,13 +1,13 @@ -error[E0381]: used binding `x` isn't initialized in all conditions +error[E0381]: used binding `x` is possibly-uninitialized --> $DIR/borrowck-if-with-else.rs:10:9 | LL | let x: isize; | - binding declared here but left uninitialized LL | if 1 > 2 { - | ----- `x` is uninitialized if this condition is met + | ----- if this condition is `true`, `x` is not initialized ... LL | foo(x); - | ^ `x` used here but it isn't initialized in all conditions + | ^ `x` used here but it is possibly-uninitialized error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-or-init.stderr b/src/test/ui/borrowck/borrowck-or-init.stderr index 633c4017d16..0bc24f1b693 100644 --- a/src/test/ui/borrowck/borrowck-or-init.stderr +++ b/src/test/ui/borrowck/borrowck-or-init.stderr @@ -1,4 +1,4 @@ -error[E0381]: used binding `i` isn't initialized in all conditions +error[E0381]: used binding `i` is possibly-uninitialized --> $DIR/borrowck-or-init.rs:5:20 | LL | let i: isize; @@ -7,7 +7,7 @@ LL | LL | println!("{}", false || { i = 5; true }); | ----- binding initialized here in some conditions LL | println!("{}", i); - | ^ `i` used here but it isn't initialized in all conditions + | ^ `i` used here but it is possibly-uninitialized | = note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/borrowck/borrowck-while-break.stderr b/src/test/ui/borrowck/borrowck-while-break.stderr index ab7d50b834a..44674febf49 100644 --- a/src/test/ui/borrowck/borrowck-while-break.stderr +++ b/src/test/ui/borrowck/borrowck-while-break.stderr @@ -1,13 +1,13 @@ -error[E0381]: used binding `v` isn't initialized in all conditions +error[E0381]: used binding `v` is possibly-uninitialized --> $DIR/borrowck-while-break.rs:7:20 | LL | let v; | - binding declared here but left uninitialized LL | while cond { - | ---- `v` is uninitialized if this condition isn't met and the `while` loop runs 0 times + | ---- if this condition isn't met and the `while` loop runs 0 times, `v` is not initialized ... LL | println!("{}", v); - | ^ `v` used here but it isn't initialized in all conditions + | ^ `v` used here but it is possibly-uninitialized | = note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/borrowck/borrowck-while.stderr b/src/test/ui/borrowck/borrowck-while.stderr index 5bb86b11ba5..c45235990c3 100644 --- a/src/test/ui/borrowck/borrowck-while.stderr +++ b/src/test/ui/borrowck/borrowck-while.stderr @@ -1,12 +1,12 @@ -error[E0381]: used binding `x` isn't initialized in all conditions +error[E0381]: used binding `x` is possibly-uninitialized --> $DIR/borrowck-while.rs:4:12 | LL | let mut x: isize; | ----- binding declared here but left uninitialized LL | while 1 == 1 { x = 10; } - | ------ `x` is uninitialized if this condition isn't met and the `while` loop runs 0 times + | ------ if this condition isn't met and the `while` loop runs 0 times, `x` is not initialized LL | return x; - | ^ `x` used here but it isn't initialized in all conditions + | ^ `x` used here but it is possibly-uninitialized error: aborting due to previous error diff --git a/src/test/ui/nll/match-cfg-fake-edges.stderr b/src/test/ui/nll/match-cfg-fake-edges.stderr index 39933db3648..b7529389f02 100644 --- a/src/test/ui/nll/match-cfg-fake-edges.stderr +++ b/src/test/ui/nll/match-cfg-fake-edges.stderr @@ -1,11 +1,11 @@ -error[E0381]: used binding `x` isn't initialized in all conditions +error[E0381]: used binding `x` is possibly-uninitialized --> $DIR/match-cfg-fake-edges.rs:21:13 | LL | let x; | - binding declared here but left uninitialized ... LL | x; - | ^ `x` used here but it isn't initialized in all conditions + | ^ `x` used here but it is possibly-uninitialized error[E0382]: use of moved value: `x` --> $DIR/match-cfg-fake-edges.rs:35:13 diff --git a/src/test/ui/rfc-2497-if-let-chains/chains-without-let.stderr b/src/test/ui/rfc-2497-if-let-chains/chains-without-let.stderr index a3d8c608f4b..30d5a6779fc 100644 --- a/src/test/ui/rfc-2497-if-let-chains/chains-without-let.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/chains-without-let.stderr @@ -1,30 +1,30 @@ -error[E0381]: used binding `z` isn't initialized in all conditions +error[E0381]: used binding `z` is possibly-uninitialized --> $DIR/chains-without-let.rs:3:34 | LL | let z; | - binding declared here but left uninitialized LL | if true && { z = 3; true} && z == 3 {} - | ----- ^ `z` used here but it isn't initialized in all conditions + | ----- ^ `z` used here but it is possibly-uninitialized | | | binding initialized here in some conditions -error[E0381]: used binding `z` isn't initialized in all conditions +error[E0381]: used binding `z` is possibly-uninitialized --> $DIR/chains-without-let.rs:9:31 | LL | let z; | - binding declared here but left uninitialized LL | true && { z = 3; true} && z == 3; - | ----- ^ `z` used here but it isn't initialized in all conditions + | ----- ^ `z` used here but it is possibly-uninitialized | | | binding initialized here in some conditions -error[E0381]: used binding `z` isn't initialized in all conditions +error[E0381]: used binding `z` is possibly-uninitialized --> $DIR/chains-without-let.rs:15:36 | LL | let z; | - binding declared here but left uninitialized LL | if false || { z = 3; false} || z == 3 {} - | ----- ^ `z` used here but it isn't initialized in all conditions + | ----- ^ `z` used here but it is possibly-uninitialized | | | binding initialized here in some conditions diff --git a/src/test/ui/try-block/try-block-opt-init.stderr b/src/test/ui/try-block/try-block-opt-init.stderr index 72e732599c0..c397385017f 100644 --- a/src/test/ui/try-block/try-block-opt-init.stderr +++ b/src/test/ui/try-block/try-block-opt-init.stderr @@ -1,4 +1,4 @@ -error[E0381]: used binding `cfg_res` isn't initialized in all conditions +error[E0381]: used binding `cfg_res` is possibly-uninitialized --> $DIR/try-block-opt-init.rs:15:5 | LL | let cfg_res; @@ -8,7 +8,7 @@ LL | cfg_res = 5; | ----------- binding initialized here in some conditions ... LL | assert_eq!(cfg_res, 5); - | ^^^^^^^^^^^^^^^^^^^^^^ `cfg_res` used here but it isn't initialized in all conditions + | ^^^^^^^^^^^^^^^^^^^^^^ `cfg_res` used here but it is possibly-uninitialized | = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) |
