summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr')
-rw-r--r--tests/ui/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.stderr13
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<_>`