Skip to content

Commit 1466064

Browse files
committed
Type inference: Disable universal conditions by default
1 parent 6b34d0d commit 1466064

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

rust/ql/lib/codeql/rust/internal/TypeInference.qll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,8 +2188,6 @@ private module MethodResolution {
21882188
exists(mc) and
21892189
constraint.(TraitType).getTrait() instanceof DerefTrait
21902190
}
2191-
2192-
predicate useUniversalConditions() { none() }
21932191
}
21942192

21952193
private module MethodCallSatisfiesDerefConstraint =
@@ -3561,8 +3559,6 @@ private module AwaitSatisfiesConstraintInput implements SatisfiesConstraintInput
35613559
exists(term) and
35623560
constraint.(TraitType).getTrait() instanceof FutureTrait
35633561
}
3564-
3565-
predicate useUniversalConditions() { none() }
35663562
}
35673563

35683564
pragma[nomagic]
@@ -3759,8 +3755,6 @@ private module ForIterableSatisfiesConstraintInput implements
37593755
t instanceof IntoIteratorTrait
37603756
)
37613757
}
3762-
3763-
predicate useUniversalConditions() { none() }
37643758
}
37653759

37663760
pragma[nomagic]
@@ -3812,8 +3806,6 @@ private module InvokedClosureSatisfiesConstraintInput implements
38123806
exists(term) and
38133807
constraint.(TraitType).getTrait() instanceof FnOnceTrait
38143808
}
3815-
3816-
predicate useUniversalConditions() { none() }
38173809
}
38183810

38193811
/** Gets the type of `ce` when viewed as an implementation of `FnOnce`. */

rust/ql/lib/codeql/rust/internal/typeinference/BlanketImplementation.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ module SatisfiesBlanketConstraint<
117117
predicate relevantConstraint(ArgumentTypeAndBlanketOffset ato, Type constraint) {
118118
relevantConstraint(ato, _, constraint.(TraitType).getTrait())
119119
}
120-
121-
predicate useUniversalConditions() { none() }
122120
}
123121

124122
private module SatisfiesBlanketConstraint =

shared/typeinference/codeql/typeinference/internal/TypeInference.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
849849
* checked. Hence using these represent a trade-off between too many
850850
* constraints and too few constraints being satisfied.
851851
*/
852-
default predicate useUniversalConditions() { any() }
852+
default predicate useUniversalConditions() { none() }
853853
}
854854

855855
module SatisfiesConstraint<

0 commit comments

Comments
 (0)