summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/while-let-typo.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/while-let-typo.stderr')
-rw-r--r--tests/ui/suggestions/while-let-typo.stderr13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/ui/suggestions/while-let-typo.stderr b/tests/ui/suggestions/while-let-typo.stderr
index 7cc2ed314..69a7e5761 100644
--- a/tests/ui/suggestions/while-let-typo.stderr
+++ b/tests/ui/suggestions/while-let-typo.stderr
@@ -21,6 +21,17 @@ LL | while let x = 5 {}
| +++
error[E0308]: mismatched types
+ --> $DIR/while-let-typo.rs:5:11
+ |
+LL | while Some(foo) = bar {}
+ | ^^^^^^^^^^^^^^^ expected `bool`, found `()`
+ |
+help: consider adding `let`
+ |
+LL | while let Some(foo) = bar {}
+ | +++
+
+error[E0308]: mismatched types
--> $DIR/while-let-typo.rs:6:11
|
LL | while 3 = foo {}
@@ -39,7 +50,7 @@ help: you might have meant to use pattern destructuring
LL | while let Some(3) = foo {}
| +++
-error: aborting due to 4 previous errors
+error: aborting due to 5 previous errors
Some errors have detailed explanations: E0070, E0308, E0425.
For more information about an error, try `rustc --explain E0070`.