]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/did_you_mean/issue-54109-and_instead_of_ampersands.stderr
Add "while" tests for issue 54109
[rust.git] / src / test / ui / did_you_mean / issue-54109-and_instead_of_ampersands.stderr
index 74ebb1e757c96158f7285a4d995da52221f07dd7..552619dd4beecfcfc4d2d79a426cb6e57e411f49 100644 (file)
@@ -32,4 +32,23 @@ LL |     if (a or b) {
    |           expected one of 8 possible tokens here
    |           help: use `||` instead of `or` for the boolean operator: `||`
 
-error: aborting due to 4 previous errors
+error: expected one of `!`, `.`, `::`, `?`, `{`, or an operator, found `and`
+  --> $DIR/issue-54109-and_instead_of_ampersands.rs:50:13
+   |
+LL |     while a and b {
+   |             ^^^
+   |             |
+   |             expected one of `!`, `.`, `::`, `?`, `{`, or an operator here
+   |             help: use `&&` instead of `and` for the boolean operator: `&&`
+
+error: expected one of `!`, `.`, `::`, `?`, `{`, or an operator, found `or`
+  --> $DIR/issue-54109-and_instead_of_ampersands.rs:59:13
+   |
+LL |     while a or b {
+   |             ^^
+   |             |
+   |             expected one of `!`, `.`, `::`, `?`, `{`, or an operator here
+   |             help: use `||` instead of `or` for the boolean operator: `||`
+
+error: aborting due to 6 previous errors
+