mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #20704 from hvitved/rust/fix-bad-joins
Rust: Fix two bad joins
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user