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

@@ -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)