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

E0088 needs to be updated to new format #35226

Closed
sophiajt opened this issue Aug 2, 2016 · 2 comments
Closed

E0088 needs to be updated to new format #35226

sophiajt opened this issue Aug 2, 2016 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@sophiajt
Copy link
Contributor

sophiajt commented Aug 2, 2016

From: src/test/compile-fail/E0088.rs

Error E0088 needs to be updated with a span_label, taking it from:

error[E0088]: too many lifetime parameters provided: expected 0 parameters, found 1 parameter
  --> src/test/compile-fail/E0088.rs:14:9
   |
14 |     f::<'static>(); //~ ERROR E0088
   |         ^^^^^^^

To:

error[E0088]: too many lifetime parameters provided: expected 0 parameters, found 1 parameter
  --> src/test/compile-fail/E0088.rs:14:9
   |
14 |     f::<'static>(); //~ ERROR E0088
   |         ^^^^^^^ 0 lifetime parameters expected

Bonus: we may want to detect the 0 case and say:

error[E0088]: too many lifetime parameters provided: expected 0 parameters, found 1 parameter
  --> src/test/compile-fail/E0088.rs:14:9
   |
14 |     f::<'static>(); //~ ERROR E0088
   |         ^^^^^^^ unexpected lifetime parameter
@sophiajt sophiajt added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Aug 2, 2016
@bstrie
Copy link
Contributor

bstrie commented Sep 25, 2016

Freeing this one up as part of the final push for #35233. @yossi-k , it looks like you already have an in-flight PR which now should be unblocked thanks to @jonathandturner 's recent PR, so feel free to reclaim this if you have time. Otherwise, anyone else may want to base their work off of @yossi-k 's PR.

@ojsheikh
Copy link
Contributor

I can finish this up based on @yossi-k's PR. Based on the discussion for #36208, it seems all that is required (aside from a rebase/cherry-pick) is to change the target span to be that of the first unexpected lifetime argument, instead of attempting to merge the spans. However, since functions do not take lifetime parameters at all that will always turn out to be the first lifetime parameter supplied to the function call. As such, will it be better if the error message specified that function calls never take lifetime parameters at all?

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Nov 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

No branches or pull requests

3 participants