Auto merge of #58872 - rep-nop:diagnostic-fix-56031, r=petrochenkov
Adds help message in error for invalid `impl for T` syntax Fixes #56031.
This commit is contained in:
commit
cd45b19bd2
3 changed files with 25 additions and 3 deletions
6
src/test/ui/issues/issue-56031.rs
Normal file
6
src/test/ui/issues/issue-56031.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
struct T;
|
||||
|
||||
impl for T {}
|
||||
//~^ ERROR missing trait in a trait impl
|
||||
|
||||
fn main() {}
|
||||
8
src/test/ui/issues/issue-56031.stderr
Normal file
8
src/test/ui/issues/issue-56031.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error: missing trait in a trait impl
|
||||
--> $DIR/issue-56031.rs:3:5
|
||||
|
|
||||
LL | impl for T {}
|
||||
| ^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue