Skip to content

E0057 needs to be updated to new format #35214

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
sophiajt opened this issue Aug 2, 2016 · 9 comments · Fixed by #36222
Closed

E0057 needs to be updated to new format #35214

sophiajt opened this issue Aug 2, 2016 · 9 comments · Fixed by #36222
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/E0057.rs

Error E0057 needs a span_label, updating it from:

error[E0057]: this function takes 1 parameter but 2 parameters were supplied
  --> src/test/compile-fail/E0057.rs:15:13
   |
15 |     let c = f(2, 3); //~ ERROR E0057
   |             ^^^^^^^
   |
   = note: the following parameter type was expected: (_,)

To:

error[E0057]: this function takes 1 parameter but 2 parameters were supplied
  --> src/test/compile-fail/E0057.rs:15:13
   |
15 |     let c = f(2, 3); //~ ERROR E0057
   |             ^^^^^^^ expected 1 parameter
   |
   = note: the following parameter type was expected: (_,)

Bonus 1: The note seems excessive. Check other E0057 errors. If it is not needed, remove the note.

Bonus 2: The span for the error could likely focus on the parameters rather than the whole call.

@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
@paulfanelli
Copy link
Contributor

I'm taking this one.

@paulfanelli
Copy link
Contributor

@jonathandturner I think I've got most of this fix/working, but I'm having a problem fixing one of the unit test cases - issue-3044.rs. The other related test cases (issue-18819, issue-4935, method-call-err-msg, not-enough-arguments, overloaded-calls-bad and variadic-ffi-3) I was able to fix by following your blog guide. For some reason, issue-3044 is 'different' and I don't understand why. Not sure how to proceed...

@sophiajt
Copy link
Contributor Author

sophiajt commented Aug 5, 2016

@paulfanelli - can you show the errors you get when you try to get issue-3044 to pass?

@paulfanelli
Copy link
Contributor

@jonathandturner I think I fixed the problem. I'm now trying to get my code checked in and pushed to by fork. Having some ssh key/cert issues. I think once I do that, I can do a PR?

@paulfanelli
Copy link
Contributor

I just submitted a PR, but not sure if I did it correctly.

@acrrd
Copy link
Contributor

acrrd commented Sep 1, 2016

The note of #35290 and this one are printed by the same function, can I modify it to print the expected types directly in the label?

I also did the bonus2 part for both E0060 and E0061.

@bstrie
Copy link
Contributor

bstrie commented Sep 25, 2016

Freeing this one up as part of the final push for #35233.

@bstrie
Copy link
Contributor

bstrie commented Sep 25, 2016

Actually, according to the comments in #35395 maybe this is already closed? @paulfanelli @jonathandturner , can you confirm?

@KiChjang
Copy link
Member

@bstrie I think #35395 should be closed, and progress is under way in #36222.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Oct 7, 2016
# for free to join this conversation on GitHub. Already have an account? # 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

Successfully merging a pull request may close this issue.

5 participants