-
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
E0090: Add explanation for error message #40723
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
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.
Take a look at the wording for E0088 to expand this a bit. For example, you could also show what the proper code would look like.
src/librustc_typeck/diagnostics.rs
Outdated
@@ -1223,6 +1223,18 @@ fn main() { | |||
``` | |||
"##, | |||
|
|||
E0090: r##" | |||
The wrong number of lifetimes were supplied. For example: |
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.
Can you specify it is only when too few lifetimes are supplied that you get this error? When it is too many the error is E0088.
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.
Done.
@bors r+ rollup |
📌 Commit 8ea0f18 has been approved by |
…r=estebank E0090: Add explanation for error message See rust-lang#32777 $ rustc --explain E0090 The wrong number of lifetimes were supplied. For example: ``` fn foo<'a: 'b, 'b: 'a>() {} fn main() { foo::<'static>(); // error, expected 2 lifetime parameters } ```
…r=estebank E0090: Add explanation for error message See rust-lang#32777 $ rustc --explain E0090 The wrong number of lifetimes were supplied. For example: ``` fn foo<'a: 'b, 'b: 'a>() {} fn main() { foo::<'static>(); // error, expected 2 lifetime parameters } ```
See #32777