-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Show detailed expected/found types in error message when trait paths are the same #89633
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
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3af5075
to
493ca46
Compare
This comment has been minimized.
This comment has been minimized.
I believe this PR is ready for review. |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 7b9ddbd with merge 241eecf4e768114fe5702e365e7f003c1ada0208... |
☀️ Try build successful - checks-actions |
Queued 241eecf4e768114fe5702e365e7f003c1ada0208 with parent f875143, future comparison URL. |
Finished benchmarking commit (241eecf4e768114fe5702e365e7f003c1ada0208): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. @bors rollup=never |
@bors r+ |
📌 Commit 7b9ddbd has been approved by |
⌛ Testing commit 7b9ddbd with merge c63fbaa9799dba29b73feb023d15c0cd8a4873f8... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks to CI, I found error messages change when |
because previous test does not cause the expected error message when `-Z borrowck=mir`.
@petrochenkov I updated the test to pass with ./x.py test ./src/test/ui/issues/issue-65230.rs --compare-mode nll |
@bors r+ |
📌 Commit 9211bee has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (68dfa07): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Fixes #65230.
Issue solved by this PR
Compiler generates the following note:
This note is not useful since the expected type and the found type are the same.
How this PR solve the issue
When the expected type and the found type are exactly the same in string representation, the note falls back to the detailed string representation of trait ref:
So that a user can notice what was different between the expected one and the found one.