summaryrefslogtreecommitdiffstats
path: root/tests/ui/expr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/expr')
-rw-r--r--tests/ui/expr/if/bad-if-let-suggestion.rs3
-rw-r--r--tests/ui/expr/if/bad-if-let-suggestion.stderr23
2 files changed, 8 insertions, 18 deletions
diff --git a/tests/ui/expr/if/bad-if-let-suggestion.rs b/tests/ui/expr/if/bad-if-let-suggestion.rs
index a8b2a2830..99d584ac7 100644
--- a/tests/ui/expr/if/bad-if-let-suggestion.rs
+++ b/tests/ui/expr/if/bad-if-let-suggestion.rs
@@ -4,9 +4,8 @@
fn a() {
if let x = 1 && i = 2 {}
//~^ ERROR cannot find value `i` in this scope
- //~| ERROR `let` expressions in this position are unstable
//~| ERROR mismatched types
- //~| ERROR `let` expressions are not supported here
+ //~| ERROR expected expression, found `let` statement
}
fn b() {
diff --git a/tests/ui/expr/if/bad-if-let-suggestion.stderr b/tests/ui/expr/if/bad-if-let-suggestion.stderr
index 3a53a20b4..20ac9ca76 100644
--- a/tests/ui/expr/if/bad-if-let-suggestion.stderr
+++ b/tests/ui/expr/if/bad-if-let-suggestion.stderr
@@ -1,4 +1,4 @@
-error: `let` expressions are not supported here
+error: expected expression, found `let` statement
--> $DIR/bad-if-let-suggestion.rs:5:8
|
LL | if let x = 1 && i = 2 {}
@@ -13,7 +13,7 @@ LL | if let x = 1 && i = 2 {}
| ^ not found in this scope
error[E0425]: cannot find value `i` in this scope
- --> $DIR/bad-if-let-suggestion.rs:13:9
+ --> $DIR/bad-if-let-suggestion.rs:12:9
|
LL | fn a() {
| ------ similarly named function `a` defined here
@@ -22,7 +22,7 @@ LL | if (i + j) = i {}
| ^ help: a function with a similar name exists: `a`
error[E0425]: cannot find value `j` in this scope
- --> $DIR/bad-if-let-suggestion.rs:13:13
+ --> $DIR/bad-if-let-suggestion.rs:12:13
|
LL | fn a() {
| ------ similarly named function `a` defined here
@@ -31,7 +31,7 @@ LL | if (i + j) = i {}
| ^ help: a function with a similar name exists: `a`
error[E0425]: cannot find value `i` in this scope
- --> $DIR/bad-if-let-suggestion.rs:13:18
+ --> $DIR/bad-if-let-suggestion.rs:12:18
|
LL | fn a() {
| ------ similarly named function `a` defined here
@@ -40,7 +40,7 @@ LL | if (i + j) = i {}
| ^ help: a function with a similar name exists: `a`
error[E0425]: cannot find value `x` in this scope
- --> $DIR/bad-if-let-suggestion.rs:20:8
+ --> $DIR/bad-if-let-suggestion.rs:19:8
|
LL | fn a() {
| ------ similarly named function `a` defined here
@@ -48,15 +48,6 @@ LL | fn a() {
LL | if x[0] = 1 {}
| ^ help: a function with a similar name exists: `a`
-error[E0658]: `let` expressions in this position are unstable
- --> $DIR/bad-if-let-suggestion.rs:5:8
- |
-LL | if let x = 1 && i = 2 {}
- | ^^^^^^^^^
- |
- = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
- = help: add `#![feature(let_chains)]` to the crate attributes to enable
-
error[E0308]: mismatched types
--> $DIR/bad-if-let-suggestion.rs:5:8
|
@@ -68,7 +59,7 @@ help: you might have meant to compare for equality
LL | if let x = 1 && i == 2 {}
| +
-error: aborting due to 8 previous errors
+error: aborting due to 7 previous errors
-Some errors have detailed explanations: E0308, E0425, E0658.
+Some errors have detailed explanations: E0308, E0425.
For more information about an error, try `rustc --explain E0308`.