-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure we consume a generic arg when checking mistyped turbofish
- Loading branch information
1 parent
6f7e00a
commit dbdef68
Showing
3 changed files
with
25 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn foo() { | ||
let x = Tr<A, A:>; | ||
//~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,` | ||
} | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
tests/ui/parser/recover/turbofish-arg-with-stray-colon.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `,` | ||
--> $DIR/turbofish-arg-with-stray-colon.rs:2:17 | ||
| | ||
LL | let x = Tr<A, A:>; | ||
| ^ expected one of 8 possible tokens | ||
| | ||
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728> | ||
help: maybe write a path separator here | ||
| | ||
LL | let x = Tr<A, A::>; | ||
| ~~ | ||
|
||
error: aborting due to 1 previous error | ||
|