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:
@@ -1231,7 +1231,7 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate directTypeMatch0(
|
||||
Access a, AccessEnvironment e, Declaration target, DeclarationPosition dpos,
|
||||
Access a, DeclarationPosition dpos, AccessEnvironment e, Declaration target,
|
||||
TypePath pathToTypeParam, TypeParameter tp
|
||||
) {
|
||||
not exists(getTypeArgument(a, target, tp, _)) and
|
||||
@@ -1248,7 +1248,7 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
|
||||
Access a, AccessEnvironment e, Declaration target, TypePath path, Type t, TypeParameter tp
|
||||
) {
|
||||
exists(AccessPosition apos, DeclarationPosition dpos, TypePath pathToTypeParam |
|
||||
directTypeMatch0(a, e, target, dpos, pathToTypeParam, tp) and
|
||||
directTypeMatch0(a, dpos, e, target, pathToTypeParam, tp) and
|
||||
accessDeclarationPositionMatch(apos, dpos) and
|
||||
t = a.getInferredType(e, apos, pathToTypeParam.appendInverse(path))
|
||||
)
|
||||
@@ -1340,7 +1340,7 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
|
||||
}
|
||||
|
||||
private newtype TRelevantAccess =
|
||||
MkRelevantAccess(Access a, AccessEnvironment e, AccessPosition apos, TypePath path) {
|
||||
MkRelevantAccess(Access a, AccessPosition apos, AccessEnvironment e, TypePath path) {
|
||||
relevantAccessConstraint(a, e, _, apos, path, _)
|
||||
}
|
||||
|
||||
@@ -1350,11 +1350,11 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
|
||||
*/
|
||||
private class RelevantAccess extends MkRelevantAccess {
|
||||
Access a;
|
||||
AccessEnvironment e;
|
||||
AccessPosition apos;
|
||||
AccessEnvironment e;
|
||||
TypePath path;
|
||||
|
||||
RelevantAccess() { this = MkRelevantAccess(a, e, apos, path) }
|
||||
RelevantAccess() { this = MkRelevantAccess(a, apos, e, path) }
|
||||
|
||||
Type getTypeAt(TypePath suffix) {
|
||||
result = a.getInferredType(e, apos, path.appendInverse(suffix))
|
||||
@@ -1385,7 +1385,7 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
|
||||
Type constraint, TypePath path, Type t
|
||||
) {
|
||||
exists(RelevantAccess ra |
|
||||
ra = MkRelevantAccess(a, e, apos, prefix) and
|
||||
ra = MkRelevantAccess(a, apos, e, prefix) and
|
||||
SatisfiesConstraint<RelevantAccess, SatisfiesConstraintInput>::satisfiesConstraintType(ra,
|
||||
constraint, path, t) and
|
||||
constraint = ra.getConstraint(target)
|
||||
|
||||
Reference in New Issue
Block a user