-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Assume prelude is always available in path resolution #19936
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
Rust: Assume prelude is always available in path resolution #19936
Conversation
1dd2cf5 to
d3bf010
Compare
d3bf010 to
bd1f46b
Compare
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
geoffw0
left a comment
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.
Is the goal here mainly to reduce inconsistencies?
aibaars
left a comment
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.
Looks fine to me.
The goal is to resolve more paths; I have seen cases where the prelude was not correctly taken into account, which this PR resolves. |
|
I forgot to look at DCA before approving - significantly more sinks are found which is great, and probably explained by resolving more paths 🎉. We also find more call targets and have fewer type inference inconsistencies 👍. |
It should be safe to assume that the prelude is always available, since shadowing definitions will be prioritized anyway, so this PR removes the crate-dependency restriction.
DCA looks great:
windows-rs, in particular, has a high increase in resolvable calls (from 11 % to 33 %).