Skip to content

Show the name of the trait in the error message #10118

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

Closed
wants to merge 1 commit into from

Conversation

jaeminMoon
Copy link
Contributor

Fix #5925.

@@ -13,7 +13,7 @@ trait foo {
}
impl foo for int {
fn bar(&self) -> int {
//~^ ERROR method `bar` has 0 parameters but the trait has 1
//~^ ERROR method `bar` has 0 parameters but the trait `foo::bar` has 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems incorrect. foo::bar is a method declaration, not a trait.

@pcwalton
Copy link
Contributor

pcwalton commented Nov 3, 2013

Agreed with @cmr.

@brson
Copy link
Contributor

brson commented Nov 6, 2013

@jaeminMoon Can you make the change @cmr requested to the message? Thanks for your patience.

bors added a commit that referenced this pull request Nov 17, 2013
@emberian emberian closed this in ab9e3a6 Nov 17, 2013
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 16, 2022
Generate rust type from json

fix rust-lang#10118

Should this be a diagnostic? I made it a diagnostic because of issue label.
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.

Confusing error: 'method read has 1 parameters'
5 participants