Skip to content
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

Merged
merged 1 commit into from
Jul 24, 2015
Merged

add error diagnostics for E0437, E0438 #27145

merged 1 commit into from
Jul 24, 2015

Conversation

apasel422
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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)?

@apasel422
Copy link
Contributor Author

Nits addressed.

@apasel422
Copy link
Contributor Author

r? @Manishearth

Here is an example that demonstrates the error:

```
trait Foo {}
Copy link
Member

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

@apasel422
Copy link
Contributor Author

@Manishearth Updated.

@bors
Copy link
Contributor

bors commented Jul 22, 2015

☔ The latest upstream changes (presumably #27219) made this pull request unmergeable. Please resolve the merge conflicts.

@apasel422 apasel422 changed the title add error diagnostics for E0407, E0437, E0438 add error diagnostics for E0437, E0438 Jul 22, 2015
@apasel422
Copy link
Contributor Author

Rebased.

@Manishearth
Copy link
Member

r=me with a trait method added

@apasel422
Copy link
Contributor Author

To which one? This PR no longer addresses E0407.

@Manishearth
Copy link
Member

@bors r+ rollup

oh, okay

@bors
Copy link
Contributor

bors commented Jul 23, 2015

📌 Commit cf8a163 has been approved by Manishearth

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 24, 2015
bors added a commit that referenced this pull request Jul 24, 2015
@bors bors merged commit cf8a163 into rust-lang:master Jul 24, 2015
@apasel422 apasel422 deleted the diagnostic-407-437-438 branch July 24, 2015 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants