@@ -2544,8 +2544,7 @@ private module AssocFunctionResolution {
25442544 Location getLocation ( ) { result = afc .getLocation ( ) }
25452545 }
25462546
2547- private module CallSatisfiesDerefConstraintInput implements
2548- SatisfiesConstraintInputSig< CallDerefCand >
2547+ private module CallSatisfiesDerefConstraintInput implements SatisfiesTypeInputSig< CallDerefCand >
25492548 {
25502549 pragma [ nomagic]
25512550 predicate relevantConstraint ( CallDerefCand mc , Type constraint ) {
@@ -2555,7 +2554,7 @@ private module AssocFunctionResolution {
25552554 }
25562555
25572556 private module CallSatisfiesDerefConstraint =
2558- SatisfiesConstraint < CallDerefCand , CallSatisfiesDerefConstraintInput > ;
2557+ SatisfiesType < CallDerefCand , CallSatisfiesDerefConstraintInput > ;
25592558
25602559 pragma [ nomagic]
25612560 private AssociatedTypeTypeParameter getDerefTargetTypeParameter ( ) {
@@ -3586,21 +3585,20 @@ final private class AwaitTarget extends Expr {
35863585 Type getTypeAt ( TypePath path ) { result = inferType ( this , path ) }
35873586}
35883587
3589- private module AwaitSatisfiesConstraintInput implements SatisfiesConstraintInputSig < AwaitTarget > {
3588+ private module AwaitSatisfiesTypeInput implements SatisfiesTypeInputSig < AwaitTarget > {
35903589 pragma [ nomagic]
35913590 predicate relevantConstraint ( AwaitTarget term , Type constraint ) {
35923591 exists ( term ) and
35933592 constraint .( TraitType ) .getTrait ( ) instanceof FutureTrait
35943593 }
35953594}
35963595
3597- private module AwaitSatisfiesConstraint =
3598- SatisfiesConstraint< AwaitTarget , AwaitSatisfiesConstraintInput > ;
3596+ private module AwaitSatisfiesType = SatisfiesType< AwaitTarget , AwaitSatisfiesTypeInput > ;
35993597
36003598pragma [ nomagic]
36013599private Type inferAwaitExprType ( AstNode n , TypePath path ) {
36023600 exists ( TypePath exprPath |
3603- AwaitSatisfiesConstraint :: satisfiesConstraintType ( n .( AwaitExpr ) .getExpr ( ) , _, exprPath , result ) and
3601+ AwaitSatisfiesType :: satisfiesConstraintType ( n .( AwaitExpr ) .getExpr ( ) , _, exprPath , result ) and
36043602 exprPath .isCons ( getFutureOutputTypeParameter ( ) , path )
36053603 )
36063604}
@@ -3779,9 +3777,7 @@ final private class ForIterableExpr extends Expr {
37793777 Type getTypeAt ( TypePath path ) { result = inferType ( this , path ) }
37803778}
37813779
3782- private module ForIterableSatisfiesConstraintInput implements
3783- SatisfiesConstraintInputSig< ForIterableExpr >
3784- {
3780+ private module ForIterableSatisfiesTypeInput implements SatisfiesTypeInputSig< ForIterableExpr > {
37853781 predicate relevantConstraint ( ForIterableExpr term , Type constraint ) {
37863782 exists ( term ) and
37873783 exists ( Trait t | t = constraint .( TraitType ) .getTrait ( ) |
@@ -3802,15 +3798,15 @@ private AssociatedTypeTypeParameter getIntoIteratorItemTypeParameter() {
38023798 result = getAssociatedTypeTypeParameter ( any ( IntoIteratorTrait t ) .getItemType ( ) )
38033799}
38043800
3805- private module ForIterableSatisfiesConstraint =
3806- SatisfiesConstraint < ForIterableExpr , ForIterableSatisfiesConstraintInput > ;
3801+ private module ForIterableSatisfiesType =
3802+ SatisfiesType < ForIterableExpr , ForIterableSatisfiesTypeInput > ;
38073803
38083804pragma [ nomagic]
38093805private Type inferForLoopExprType ( AstNode n , TypePath path ) {
38103806 // type of iterable -> type of pattern (loop variable)
38113807 exists ( ForExpr fe , TypePath exprPath , AssociatedTypeTypeParameter tp |
38123808 n = fe .getPat ( ) and
3813- ForIterableSatisfiesConstraint :: satisfiesConstraintType ( fe .getIterable ( ) , _, exprPath , result ) and
3809+ ForIterableSatisfiesType :: satisfiesConstraintType ( fe .getIterable ( ) , _, exprPath , result ) and
38143810 exprPath .isCons ( tp , path )
38153811 |
38163812 tp = getIntoIteratorItemTypeParameter ( )
@@ -3836,21 +3832,20 @@ final private class InvokedClosureExpr extends Expr {
38363832 CallExpr getCall ( ) { result = call }
38373833}
38383834
3839- private module InvokedClosureSatisfiesConstraintInput implements
3840- SatisfiesConstraintInputSig< InvokedClosureExpr >
3835+ private module InvokedClosureSatisfiesTypeInput implements SatisfiesTypeInputSig< InvokedClosureExpr >
38413836{
38423837 predicate relevantConstraint ( InvokedClosureExpr term , Type constraint ) {
38433838 exists ( term ) and
38443839 constraint .( TraitType ) .getTrait ( ) instanceof FnOnceTrait
38453840 }
38463841}
38473842
3848- private module InvokedClosureSatisfiesConstraint =
3849- SatisfiesConstraint < InvokedClosureExpr , InvokedClosureSatisfiesConstraintInput > ;
3843+ private module InvokedClosureSatisfiesType =
3844+ SatisfiesType < InvokedClosureExpr , InvokedClosureSatisfiesTypeInput > ;
38503845
38513846/** Gets the type of `ce` when viewed as an implementation of `FnOnce`. */
38523847private Type invokedClosureFnTypeAt ( InvokedClosureExpr ce , TypePath path ) {
3853- InvokedClosureSatisfiesConstraint :: satisfiesConstraintType ( ce , _, path , result )
3848+ InvokedClosureSatisfiesType :: satisfiesConstraintType ( ce , _, path , result )
38543849}
38553850
38563851/**
0 commit comments