-
Notifications
You must be signed in to change notification settings - Fork 14k
IAT: Reinstate early bailout #148771
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
base: master
Are you sure you want to change the base?
IAT: Reinstate early bailout #148771
Conversation
|
|
f35de59 to
129c7f0
Compare
| Some(InherentAssocCandidate { impl_, assoc_item: item.def_id, scope }) | ||
| }) | ||
| .collect(); | ||
|
|
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.
Obviously this is but a hotfix for a minute part of #142006. I was briefly toying with the idea of properly addressing #142006 now but for that I would need to rewrite type-relative path resolution in HIR ty lowering to properly assemble inherent & trait candidates (instead of eagerly trying to resolve them in sequence) but I realized I would only be stepping on your toes / doing throwaway work (#145825).
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.
I wrote this test and it's rooted in a deep misconception, namely that there can't ever be a case where we would pick a trait candidate over an inherent one. Back then I didn't know about #142006.
In essence, I don't like this test, hence its removal. Once we fix #142006, we'll have plenty of tests regarding "candidate preference/elimination".
129c7f0 to
a9fd741
Compare
a9fd741 to
6ed469c
Compare
|
@bors r+ lgtm. i thought i'd get around to fixing type relative path lowering sooner than it seems like I actually am going to be so this seems reasonable for the time being |
Apparently, some people are already using IATs in their projects and get blocked by #142006 (comment) (cc dupes #143952 & #148535). Since the (temporary) fix is so trivial, let's just do it.
Addresses #142006 (comment).
cc @luissantosHCIT (#148535).
r? @BoxyUwU