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

Remove duplicated "parameter" in E0089 text #39758

Merged
merged 2 commits into from Feb 13, 2017

Conversation

shepmaster
Copy link
Member

Closes #39732

@rust-highfive
Copy link
Collaborator

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

foo::<f64>();
//~^ ERROR E0089
//~| NOTE expected 2 type parameters
foo::<f64>(); //~ ERROR expected 2 parameters, found 1 parameter [E0089]
Copy link
Member

Choose a reason for hiding this comment

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

This sentence is invalid actually... It needs to speak about type parameters and not just parameter.

Copy link
Member Author

Choose a reason for hiding this comment

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

@GuillaumeGomez it does actually, it's just not repeating "type parameter" throughout the entire message:

error[E0089]: too few type parameters provided: expected 2 parameters parameters, found 1 parameter parameter

(emphasis mine)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but repeating things is a good thing from my point of view. It allows to have coherent error messages.

@shepmaster
Copy link
Member Author

@GuillaumeGomez I've added a second commit that adds the requested "type" or "lifetime" text. Since I was making a larger change, I went ahead and normalized the 4 related errors and their tests.

@GuillaumeGomez
Copy link
Member

Awesome, thanks! Once the tidy issue is fixed:

/checkout/src/test/compile-fail/E0088.rs:15: line longer than 100 chars
/checkout/src/test/compile-fail/E0088.rs:18: line longer than 100 chars

I'll r+ it.

They now always say how many lifetime / type parameters were expected
and are explicit about stating "lifetime" or "type" instead of just
"parameter".
@shepmaster
Copy link
Member Author

@GuillaumeGomez I always fail to check tidy. Fixed now.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Feb 13, 2017

📌 Commit 1c99841 has been approved by GuillaumeGomez

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 13, 2017
…GuillaumeGomez

Remove duplicated "parameter" in E0089 text

Closes rust-lang#39732
bors added a commit that referenced this pull request Feb 13, 2017
Rollup of 5 pull requests

- Successful merges: #39716, #39758, #39759, #39774, #39784
- Failed merges:
@bors bors merged commit 1c99841 into rust-lang:master Feb 13, 2017
@shepmaster shepmaster deleted the e0089-duplicate-text branch February 14, 2017 01:02
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.

None yet

5 participants