-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve recovery for missing trait in a trait impl
- Loading branch information
1 parent
00887f3
commit e19b228
Showing
3 changed files
with
15 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
struct T; | ||
|
||
impl for T {} | ||
//~^ ERROR missing trait in a trait impl | ||
|
||
fn main() {} |
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,10 +1,8 @@ | ||
error: expected `<`, found `T` | ||
--> $DIR/issue-56031.rs:3:10 | ||
error: missing trait in a trait impl | ||
--> $DIR/issue-56031.rs:3:5 | ||
| | ||
LL | impl for T {} | ||
| ^ expected `<` here | ||
| | ||
= help: did you forget a trait name after `impl`? | ||
| ^ | ||
|
||
error: aborting due to previous error | ||
|