Improve E0617 to Distinguish Between Fn Item and Fn Pointer in FFI#120197
Improve E0617 to Distinguish Between Fn Item and Fn Pointer in FFI#120197HTGAzureX1212 wants to merge 1 commit intorust-lang:masterfrom
E0617 to Distinguish Between Fn Item and Fn Pointer in FFI#120197Conversation
|
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
E0617 to Distinguish Between Fn Item and Fn Pointer in FFIE0617 to Distinguish Between Fn Item and Fn Pointer in FFI
|
See #99927 for another atttempt to distinguish FnDef types in pretty printing. |
|
r? @estebank |
|
☔ The latest upstream changes (presumably #119972) made this pull request unmergeable. Please resolve the merge conflicts. |
compiler/rustc_hir_analysis/src/structured_errors/missing_cast_for_variadic_arg.rs
Outdated
Show resolved
Hide resolved
e4a6aa3 to
54d8f92
Compare
This comment has been minimized.
This comment has been minimized.
estebank
left a comment
There was a problem hiding this comment.
You'll have to rebless the tests. After fixing that, could you squash all of your commits into a single one?
tidy fix compiler error fix compiler error round 2 tweak fndef pretty print fmt shorten the pretty-print output add a ui test specifically for linked issue 69232 Implement suggestion Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com> fix compiler errors rebless tests
3e36dc2 to
fe5d397
Compare
All done. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☔ The latest upstream changes (presumably #120862) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Switching to waiting on author to rebase. Then I think we should be set here, right? Feel free to request a review with @rustbot author |
|
Hey, just a heads up - currently going through exams and I wouldn't be available until the end of April. (Given that there are also some MIR tests that I have to fix, it'd be great if someone else could pick this up from here) |
|
@HTGAzureX1212 Any updates on this? Thanks |
Given that I have no idea on fixing the MIR tests completely, it’d be great to have someone take over this PR (and that I have little time to work on things now). |
|
@HTGAzureX1212 @rustbot label: +S-inactive |
This Pull Requests aims to improve the diagnostics emitted in the error E0617 when making with the difference between
fntypes andfnpointers more obvious.This involves changing the way how
ty::FnDefis pretty-printed. This implementation specifically proposes to change it to be printed in this way:Rendered diagnostic:
This also causes all diagnostic messages that utilize the pretty-printing of
ty::FnDefto use this implementation.Tests in
tests/uiare currently left untouched before a consensus can be reached over how thety::FnDefpretty-print should be modified for diagnostics.Supersedes #94637. Possible resolution of #69232.
Edit 1: I made the output a bit shorter.
Edit 2: Added example diagnostic.