-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Try to suggest dereferences on trait selection failed #72456
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
Conversation
☔ The latest upstream changes (presumably #72256) made this pull request unmergeable. Please resolve the merge conflicts. |
8d3898b
to
e66f84e
Compare
☔ The latest upstream changes (presumably #72778) made this pull request unmergeable. Please resolve the merge conflicts. |
c3fb825
to
3fc1c11
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
79a33b0
to
0c0b32d
Compare
☔ The latest upstream changes (presumably #73504) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Apologies for the delay on reviewing this. I have a couple of nitpicks. Could you address them as you rebase? Other than that, I'm happy with the changes!
src/librustc_trait_selection/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
src/librustc_trait_selection/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
Rebase done, nitpicks applied. |
@bors r+ |
📌 Commit f1e0710 has been approved by |
…arth Rollup of 9 pull requests Successful merges: - rust-lang#72456 (Try to suggest dereferences on trait selection failed) - rust-lang#72788 (Projection bound validation) - rust-lang#72790 (core/time: Add Duration methods for zero) - rust-lang#73227 (Allow multiple `asm!` options groups and report an error on duplicate options) - rust-lang#73287 (lint: normalize projections using opaque types) - rust-lang#73291 (Pre-compute `LocalDefId` <-> `HirId` mappings and remove `NodeId` <-> `HirId` conversion APIs) - rust-lang#73378 (Remove use of specialization from librustc_arena) - rust-lang#73411 (Update bootstrap to rustc 1.45.0-beta.2 (1dc0f6d 2020-06-15)) - rust-lang#73443 (ci: allow gating GHA on everything but macOS) Failed merges: r? @ghost
Fixes #39029 Fixes #62530
This PR consists of two parts:
Autoderef
withFnCtxt
and moveAutoderef
tolibrustc_trait_selection
.The first is needed because:
Autoderef
should be used. But before this PR, it is placed inlibrustc_typeck
, which depends onlibrustc_trait_selection
. But trait selection error emitting happens inlibrustc_trait_selection
, if we want to useAutoderef
in it, dependency loop is inevitable. So I moved theAutoderef
tolibrustc_trait_selection
.FnCtxt
is coupled toAutoderef
, andFnCtxt
only exists inlibrustc_typeck
. So decoupling is needed.After this PR, we can get suggestion like this:
r? @estebank