-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
src/test/compile-fail/E0089.rs
Outdated
foo::<f64>(); | ||
//~^ ERROR E0089 | ||
//~| NOTE expected 2 type parameters | ||
foo::<f64>(); //~ ERROR expected 2 parameters, found 1 parameter [E0089] |
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.
This sentence is invalid actually... It needs to speak about type parameters and not just parameter.
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.
@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)
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.
Yes, but repeating things is a good thing from my point of view. It allows to have coherent error messages.
82f8f3f
to
3d0b83d
Compare
@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. |
Awesome, thanks! Once the tidy issue is fixed:
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".
3d0b83d
to
1c99841
Compare
@GuillaumeGomez I always fail to check tidy. Fixed now. |
Thanks! @bors: r+ rollup |
📌 Commit 1c99841 has been approved by |
…GuillaumeGomez Remove duplicated "parameter" in E0089 text Closes rust-lang#39732
Closes #39732