Merge pull request #20704 from hvitved/rust/fix-bad-joins

Rust: Fix two bad joins
This commit is contained in:
Tom Hvitved
2025-10-29 11:11:54 +01:00
committed by GitHub
2 changed files with 13 additions and 13 deletions

View File

@@ -1907,8 +1907,12 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi
}
pragma[nomagic]
private Type getInferredSelfType(string derefChain, boolean borrow, TypePath path) {
result = this.getACandidateReceiverTypeAt(derefChain, borrow, path)
private Type getInferredSelfType(AccessPosition apos, string derefChainBorrow, TypePath path) {
exists(string derefChain, boolean borrow |
result = this.getACandidateReceiverTypeAt(derefChain, borrow, path) and
derefChainBorrow = encodeDerefChainBorrow(derefChain, borrow) and
apos.isSelf()
)
}
pragma[nomagic]
@@ -1934,11 +1938,7 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi
bindingset[derefChainBorrow]
Type getInferredType(string derefChainBorrow, AccessPosition apos, TypePath path) {
exists(string derefChain, boolean borrow |
derefChainBorrow = encodeDerefChainBorrow(derefChain, borrow) and
apos.isSelf() and
result = this.getInferredSelfType(derefChain, borrow, path)
)
result = this.getInferredSelfType(apos, derefChainBorrow, path)
or
result = this.getInferredNonSelfType(apos, path)
}