-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved let-chain warning/error to ast_validation and changed to uncond…
…itional error.
- Loading branch information
Showing
5 changed files
with
92 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 26 additions & 24 deletions
50
src/test/ui/rfc-2497-if-let-chains/syntax-ambiguity-2015.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,50 @@ | ||
warning: ambigious use of `&&` | ||
--> $DIR/syntax-ambiguity-2015.rs:22:47 | ||
error: ambigious use of `&&` | ||
--> $DIR/syntax-ambiguity-2015.rs:21:47 | ||
| | ||
LL | if let Range { start: _, end: _ } = true..true && false { } | ||
| ^^^^^^^^^^^^^ help: consider adding parenthesis: `(true && false)` | ||
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)` | ||
| | ||
= note: This will be a error in Rust 2018 until the `let_chains` feature is stabilized. | ||
= note: this will be a error until the `let_chains` feature is stabilized | ||
|
||
warning: ambigious use of `||` | ||
--> $DIR/syntax-ambiguity-2015.rs:25:47 | ||
error: ambigious use of `||` | ||
--> $DIR/syntax-ambiguity-2015.rs:24:47 | ||
| | ||
LL | if let Range { start: _, end: _ } = true..true || false { } | ||
| ^^^^^^^^^^^^^ help: consider adding parenthesis: `(true || false)` | ||
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)` | ||
| | ||
= note: This will be a error in Rust 2018 until the `let_chains` feature is stabilized. | ||
= note: this will be a error until the `let_chains` feature is stabilized | ||
|
||
warning: ambigious use of `&&` | ||
--> $DIR/syntax-ambiguity-2015.rs:28:50 | ||
error: ambigious use of `&&` | ||
--> $DIR/syntax-ambiguity-2015.rs:27:50 | ||
| | ||
LL | while let Range { start: _, end: _ } = true..true && false { } | ||
| ^^^^^^^^^^^^^ help: consider adding parenthesis: `(true && false)` | ||
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true && false)` | ||
| | ||
= note: This will be a error in Rust 2018 until the `let_chains` feature is stabilized. | ||
= note: this will be a error until the `let_chains` feature is stabilized | ||
|
||
warning: ambigious use of `||` | ||
--> $DIR/syntax-ambiguity-2015.rs:31:50 | ||
error: ambigious use of `||` | ||
--> $DIR/syntax-ambiguity-2015.rs:30:50 | ||
| | ||
LL | while let Range { start: _, end: _ } = true..true || false { } | ||
| ^^^^^^^^^^^^^ help: consider adding parenthesis: `(true || false)` | ||
| ^^^^^^^^^^^^^ help: consider adding parentheses: `(true || false)` | ||
| | ||
= note: This will be a error in Rust 2018 until the `let_chains` feature is stabilized. | ||
= note: this will be a error until the `let_chains` feature is stabilized | ||
|
||
warning: ambigious use of `&&` | ||
--> $DIR/syntax-ambiguity-2015.rs:34:19 | ||
error: ambigious use of `&&` | ||
--> $DIR/syntax-ambiguity-2015.rs:33:19 | ||
| | ||
LL | if let true = false && false { } | ||
| ^^^^^^^^^^^^^^ help: consider adding parenthesis: `(false && false)` | ||
| ^^^^^^^^^^^^^^ help: consider adding parentheses: `(false && false)` | ||
| | ||
= note: This will be a error in Rust 2018 until the `let_chains` feature is stabilized. | ||
= note: this will be a error until the `let_chains` feature is stabilized | ||
|
||
warning: ambigious use of `&&` | ||
--> $DIR/syntax-ambiguity-2015.rs:37:22 | ||
error: ambigious use of `&&` | ||
--> $DIR/syntax-ambiguity-2015.rs:36:22 | ||
| | ||
LL | while let true = (1 == 2) && false { } | ||
| ^^^^^^^^^^^^^^^^^ help: consider adding parenthesis: `((1 == 2) && false)` | ||
| ^^^^^^^^^^^^^^^^^ help: consider adding parentheses: `((1 == 2) && false)` | ||
| | ||
= note: This will be a error in Rust 2018 until the `let_chains` feature is stabilized. | ||
= note: this will be a error until the `let_chains` feature is stabilized | ||
|
||
error: aborting due to 6 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters