diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:41 +0000 |
commit | 4f9fe856a25ab29345b90e7725509e9ee38a37be (patch) | |
tree | e4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr | |
parent | Adding upstream version 1.68.2+dfsg1. (diff) | |
download | rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.tar.xz rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.zip |
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr b/tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr index 498a112fa..9bc3e7541 100644 --- a/tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr +++ b/tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr @@ -37,6 +37,11 @@ help: add a block here | LL | if let Some(n) = opt else { | ^ +help: remove the `if` if you meant to write a `let...else` statement + | +LL - if let Some(n) = opt else { +LL + let Some(n) = opt else { + | error: this `if` expression is missing a block after the condition --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:28:5 @@ -101,7 +106,7 @@ error[E0308]: mismatched types --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:9:19 | LL | let Some(n) = opt && n == 1 else { - | ^^^ expected `bool`, found enum `Option` + | ^^^ expected `bool`, found `Option<i32>` | = note: expected type `bool` found enum `Option<i32>` @@ -112,7 +117,7 @@ error[E0308]: mismatched types LL | let Some(n) = opt && n == 1 else { | ^^^^^^^ ------------- this expression has type `bool` | | - | expected `bool`, found enum `Option` + | expected `bool`, found `Option<_>` | = note: expected type `bool` found enum `Option<_>` @@ -121,7 +126,7 @@ error[E0308]: mismatched types --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:15:19 | LL | let Some(n) = opt && let another = n else { - | ^^^ expected `bool`, found enum `Option` + | ^^^ expected `bool`, found `Option<i32>` | = note: expected type `bool` found enum `Option<i32>` @@ -132,7 +137,7 @@ error[E0308]: mismatched types LL | let Some(n) = opt && let another = n else { | ^^^^^^^ ---------------------- this expression has type `bool` | | - | expected `bool`, found enum `Option` + | expected `bool`, found `Option<_>` | = note: expected type `bool` found enum `Option<_>` |