forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suggest expressions that look like const generic arguments should be …
…enclosed in brackets Co-Authored-By: Esteban Kuber <github@kuber.com.ar>
- Loading branch information
Showing
19 changed files
with
782 additions
and
35 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
error: expressions must be enclosed in braces to be used as const generic arguments | ||
--> $DIR/closing-args-token.rs:11:9 | ||
| | ||
LL | S::<5 + 2 >> 7>; | ||
| ^^^^^ | ||
| | ||
help: enclose the `const` expression in braces | ||
| | ||
LL | S::<{ 5 + 2 } >> 7>; | ||
| ^ ^ | ||
|
||
error: comparison operators cannot be chained | ||
--> $DIR/closing-args-token.rs:11:16 | ||
| | ||
LL | S::<5 + 2 >> 7>; | ||
| ^ ^ | ||
| | ||
help: split the comparison into two | ||
| | ||
LL | S::<5 + 2 >> 7 && 7>; | ||
| ^^^^ | ||
|
||
error: comparison operators cannot be chained | ||
--> $DIR/closing-args-token.rs:17:20 | ||
| | ||
LL | S::<{ 5 + 2 } >> 7>; | ||
| ^ ^ | ||
| | ||
help: split the comparison into two | ||
| | ||
LL | S::<{ 5 + 2 } >> 7 && 7>; | ||
| ^^^^ | ||
|
||
error: expected expression, found `;` | ||
--> $DIR/closing-args-token.rs:22:16 | ||
| | ||
LL | T::<0 >= 3>; | ||
| ^ expected expression | ||
|
||
error: comparison operators cannot be chained | ||
--> $DIR/closing-args-token.rs:28:12 | ||
| | ||
LL | T::<x >>= 2 > 0>; | ||
| ^^ ^ | ||
| | ||
help: split the comparison into two | ||
| | ||
LL | T::<x >>= 2 && 2 > 0>; | ||
| ^^^^ | ||
|
||
error: aborting due to 5 previous errors | ||
|
Oops, something went wrong.