mirror of
https://github.com/github/codeql.git
synced 2026-02-23 10:23:41 +01:00
Merge pull request #21312 from hvitved/rust/type-inference-bad-join
Rust: Fix bad join
This commit is contained in:
@@ -419,14 +419,21 @@ module ArgsAreInstantiationsOf<ArgsAreInstantiationsOfInputSig Input> {
|
||||
private module ArgIsInstantiationOfToIndex =
|
||||
ArgIsInstantiationOf<CallAndPos, ArgIsInstantiationOfToIndexInput>;
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate argIsInstantiationOf(
|
||||
Input::Call call, FunctionPosition pos, ImplOrTraitItemNode i, Function f, int rnk
|
||||
) {
|
||||
ArgIsInstantiationOfToIndex::argIsInstantiationOf(MkCallAndPos(call, pos), i, _) and
|
||||
toCheckRanked(i, f, _, pos, rnk)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate argsAreInstantiationsOfToIndex(
|
||||
Input::Call call, ImplOrTraitItemNode i, Function f, int rnk
|
||||
) {
|
||||
exists(FunctionPosition pos |
|
||||
ArgIsInstantiationOfToIndex::argIsInstantiationOf(MkCallAndPos(call, pos), i, _) and
|
||||
call.hasTargetCand(i, f) and
|
||||
toCheckRanked(i, f, _, pos, rnk)
|
||||
argIsInstantiationOf(call, pos, i, f, rnk) and
|
||||
call.hasTargetCand(i, f)
|
||||
|
|
||||
rnk = 0
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user