@@ -2362,8 +2362,7 @@ private module AssocFunctionResolution {
23622362 Location getLocation ( ) { result = afc .getLocation ( ) }
23632363 }
23642364
2365- private module CallSatisfiesDerefConstraintInput implements
2366- SatisfiesConstraintInputSig< CallDerefCand >
2365+ private module CallSatisfiesDerefConstraintInput implements SatisfiesTypeInputSig< CallDerefCand >
23672366 {
23682367 pragma [ nomagic]
23692368 predicate relevantConstraint ( CallDerefCand mc , Type constraint ) {
@@ -2373,7 +2372,7 @@ private module AssocFunctionResolution {
23732372 }
23742373
23752374 private module CallSatisfiesDerefConstraint =
2376- SatisfiesConstraint < CallDerefCand , CallSatisfiesDerefConstraintInput > ;
2375+ SatisfiesType < CallDerefCand , CallSatisfiesDerefConstraintInput > ;
23772376
23782377 pragma [ nomagic]
23792378 private AssociatedTypeTypeParameter getDerefTargetTypeParameter ( ) {
@@ -3466,21 +3465,20 @@ final private class AwaitTarget extends Expr {
34663465 Type getTypeAt ( TypePath path ) { result = inferType ( this , path ) }
34673466}
34683467
3469- private module AwaitSatisfiesConstraintInput implements SatisfiesConstraintInputSig < AwaitTarget > {
3468+ private module AwaitSatisfiesTypeInput implements SatisfiesTypeInputSig < AwaitTarget > {
34703469 pragma [ nomagic]
34713470 predicate relevantConstraint ( AwaitTarget term , Type constraint ) {
34723471 exists ( term ) and
34733472 constraint .( TraitType ) .getTrait ( ) instanceof FutureTrait
34743473 }
34753474}
34763475
3477- private module AwaitSatisfiesConstraint =
3478- SatisfiesConstraint< AwaitTarget , AwaitSatisfiesConstraintInput > ;
3476+ private module AwaitSatisfiesType = SatisfiesType< AwaitTarget , AwaitSatisfiesTypeInput > ;
34793477
34803478pragma [ nomagic]
34813479private Type inferAwaitExprType ( AstNode n , TypePath path ) {
34823480 exists ( TypePath exprPath |
3483- AwaitSatisfiesConstraint :: satisfiesConstraintType ( n .( AwaitExpr ) .getExpr ( ) , _, exprPath , result ) and
3481+ AwaitSatisfiesType :: satisfiesConstraintType ( n .( AwaitExpr ) .getExpr ( ) , _, exprPath , result ) and
34843482 exprPath .isCons ( getFutureOutputTypeParameter ( ) , path )
34853483 )
34863484}
@@ -3616,9 +3614,7 @@ final private class ForIterableExpr extends Expr {
36163614 Type getTypeAt ( TypePath path ) { result = inferType ( this , path ) }
36173615}
36183616
3619- private module ForIterableSatisfiesConstraintInput implements
3620- SatisfiesConstraintInputSig< ForIterableExpr >
3621- {
3617+ private module ForIterableSatisfiesTypeInput implements SatisfiesTypeInputSig< ForIterableExpr > {
36223618 predicate relevantConstraint ( ForIterableExpr term , Type constraint ) {
36233619 exists ( term ) and
36243620 exists ( Trait t | t = constraint .( TraitType ) .getTrait ( ) |
@@ -3639,15 +3635,15 @@ private AssociatedTypeTypeParameter getIntoIteratorItemTypeParameter() {
36393635 result = getAssociatedTypeTypeParameter ( any ( IntoIteratorTrait t ) .getItemType ( ) )
36403636}
36413637
3642- private module ForIterableSatisfiesConstraint =
3643- SatisfiesConstraint < ForIterableExpr , ForIterableSatisfiesConstraintInput > ;
3638+ private module ForIterableSatisfiesType =
3639+ SatisfiesType < ForIterableExpr , ForIterableSatisfiesTypeInput > ;
36443640
36453641pragma [ nomagic]
36463642private Type inferForLoopExprType ( AstNode n , TypePath path ) {
36473643 // type of iterable -> type of pattern (loop variable)
36483644 exists ( ForExpr fe , TypePath exprPath , AssociatedTypeTypeParameter tp |
36493645 n = fe .getPat ( ) and
3650- ForIterableSatisfiesConstraint :: satisfiesConstraintType ( fe .getIterable ( ) , _, exprPath , result ) and
3646+ ForIterableSatisfiesType :: satisfiesConstraintType ( fe .getIterable ( ) , _, exprPath , result ) and
36513647 exprPath .isCons ( tp , path )
36523648 |
36533649 tp = getIntoIteratorItemTypeParameter ( )
@@ -3673,21 +3669,20 @@ final private class InvokedClosureExpr extends Expr {
36733669 CallExpr getCall ( ) { result = call }
36743670}
36753671
3676- private module InvokedClosureSatisfiesConstraintInput implements
3677- SatisfiesConstraintInputSig< InvokedClosureExpr >
3672+ private module InvokedClosureSatisfiesTypeInput implements SatisfiesTypeInputSig< InvokedClosureExpr >
36783673{
36793674 predicate relevantConstraint ( InvokedClosureExpr term , Type constraint ) {
36803675 exists ( term ) and
36813676 constraint .( TraitType ) .getTrait ( ) instanceof FnOnceTrait
36823677 }
36833678}
36843679
3685- private module InvokedClosureSatisfiesConstraint =
3686- SatisfiesConstraint < InvokedClosureExpr , InvokedClosureSatisfiesConstraintInput > ;
3680+ private module InvokedClosureSatisfiesType =
3681+ SatisfiesType < InvokedClosureExpr , InvokedClosureSatisfiesTypeInput > ;
36873682
36883683/** Gets the type of `ce` when viewed as an implementation of `FnOnce`. */
36893684private Type invokedClosureFnTypeAt ( InvokedClosureExpr ce , TypePath path ) {
3690- InvokedClosureSatisfiesConstraint :: satisfiesConstraintType ( ce , _, path , result )
3685+ InvokedClosureSatisfiesType :: satisfiesConstraintType ( ce , _, path , result )
36913686}
36923687
36933688/**
0 commit comments