-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add error diagnostics for E0437, E0438 #27145
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
"##, | ||
|
||
E0407: r##" | ||
Trait impls can only declare methods that are members of the trait in question. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: declare isn't quite right here. the trait itself "declares" the methods, and the impl implements them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should "implement" be used for each of the item types (not just methods)?
Nits addressed. |
r? @Manishearth |
Here is an example that demonstrates the error: | ||
|
||
``` | ||
trait Foo {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a trait method in this example
@Manishearth Updated. |
☔ The latest upstream changes (presumably #27219) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased. |
r=me with a trait method added |
To which one? This PR no longer addresses E0407. |
@bors r+ rollup oh, okay |
📌 Commit cf8a163 has been approved by |
No description provided.