Rust: fix missing canonical paths for trait impls on builtin numeric types#20001
Merged
Rust: fix missing canonical paths for trait impls on builtin numeric types#20001
Conversation
588c791 to
d64a6cd
Compare
hvitved
reviewed
Jul 9, 2025
Comment on lines
598
to
603
| ( | ||
| c1 = c2 or | ||
| c2 = c1.getADependency() or | ||
| c1 = c2.getADependency() | ||
| ) |
Contributor
There was a problem hiding this comment.
Parens can be removed if you replace the preceding and with |.
Contributor
Author
There was a problem hiding this comment.
I think I found a fix that matches better with the original intent of the code. Hopefully the tests agree as well.
ffd107d to
0bf11da
Compare
hvitved
approved these changes
Jul 9, 2025
Contributor
hvitved
left a comment
There was a problem hiding this comment.
LGTM; let's see what DCA says.
hvitved
requested changes
Jul 9, 2025
| trait = this.resolveTraitTy() and | ||
| trait.hasCanonicalPath(c2) and | ||
| if this.hasCanonicalPath(c2) | ||
| if trait.hasCanonicalPath(c1) |
Contributor
There was a problem hiding this comment.
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.
0bf11da to
d20bc98
Compare
hvitved
approved these changes
Jul 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@hvitved This is probably the wrong way to fix this.