diff options
author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2023-06-08 00:52:53 +0800 |
---|---|---|
committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2023-06-08 02:38:12 +0800 |
commit | adbfd0da6860a29d6c7a2adb315e79c91202f7ef (patch) | |
tree | 49c6ecd5d9487c3d3cd22959f9e80e8669ff81f0 /tests/ui/suggestions/while-let-typo.stderr | |
parent | afab3662eb066f05fcdb43c421b72dd19472e752 (diff) |
Fix ICE for while loop with assignment condition with LHS place expr
Diffstat (limited to 'tests/ui/suggestions/while-let-typo.stderr')
-rw-r--r-- | tests/ui/suggestions/while-let-typo.stderr | 13 |
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 7cc2ed3149b..69a7e5761d4 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`. |