-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: fix missing canonical paths for trait impls on builtin numeric types #20001
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: main
Are you sure you want to change the base?
Conversation
588c791
to
d64a6cd
Compare
( | ||
c1 = c2 or | ||
c2 = c1.getADependency() or | ||
c1 = c2.getADependency() | ||
) |
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.
Parens can be removed if you replace the preceding and
with |
.
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 think I found a fix that matches better with the original intent of the code. Hopefully the tests agree as well.
d64a6cd
to
ffd107d
Compare
ffd107d
to
0bf11da
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.
LGTM; let's see what DCA says.
@@ -595,7 +595,7 @@ class ImplItemNode extends ImplOrTraitItemNode instanceof Impl { | |||
exists(TraitItemNode trait | | |||
trait = this.resolveTraitTy() and | |||
trait.hasCanonicalPath(c2) and | |||
if this.hasCanonicalPath(c2) | |||
if trait.hasCanonicalPath(c1) |
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 figured out what happens; this needs to be reverted, and then we need to add c = this and
before the line this.getName() = "core" and
inside CrateItemNode.providesCanonicalPathPrefixFor
.
@hvitved This is probably the wrong way to fix this.