@@ -1632,22 +1632,6 @@ private module MethodResolution {
16321632 )
16331633 }
16341634
1635- private predicate testhasNoCompatibleTargetNoBorrow ( string derefChain ) {
1636- exists ( TypePath strippedTypePath , Type strippedType , ImplItemNode i |
1637- this = Debug:: getRelevantLocatable ( ) and
1638- (
1639- this .supportsAutoDerefAndBorrow ( )
1640- or
1641- // needed for the `hasNoCompatibleTarget` check in
1642- // `ReceiverSatisfiesBlanketLikeConstraintInput::hasBlanketCandidate`
1643- derefChain = ""
1644- ) and
1645- strippedType = this .getComplexStrippedType ( derefChain , TNoBorrowKind ( ) , strippedTypePath ) and
1646- this .hasNoCompatibleTargetCheck ( derefChain , TNoBorrowKind ( ) , strippedTypePath , strippedType ) and
1647- methodCallBlanketLikeCandidate ( this , _, i , _, _, _)
1648- )
1649- }
1650-
16511635 /**
16521636 * Holds if the candidate receiver type represented by `derefChain` does not have
16531637 * a matching non-blanket method target.
@@ -1965,11 +1949,6 @@ private module MethodResolution {
19651949 not result = TUnknownType ( )
19661950 }
19671951
1968- private Type testgetTypeAt ( TypePath path ) {
1969- result = this .getTypeAt ( path ) and
1970- mc_ = Debug:: getRelevantLocatable ( )
1971- }
1972-
19731952 pragma [ nomagic]
19741953 predicate hasNoCompatibleNonBlanketTarget ( ) {
19751954 mc_ .hasNoCompatibleNonBlanketTargetSharedBorrow ( derefChain ) and
@@ -2042,11 +2021,6 @@ private module MethodResolution {
20422021 )
20432022 }
20442023
2045- private Method testresolveCallTarget ( ImplOrTraitItemNode i ) {
2046- mc_ = Debug:: getRelevantLocatable ( ) and
2047- result = this .resolveCallTarget ( i )
2048- }
2049-
20502024 /** Gets a method that matches this method call. */
20512025 pragma [ nomagic]
20522026 Method resolveCallTarget ( ImplOrTraitItemNode i ) {
@@ -2094,21 +2068,6 @@ private module MethodResolution {
20942068 private module ReceiverIsInstantiationOfSelfParamInput implements
20952069 IsInstantiationOfInputSig< MethodCallCand , AssocFunctionType >
20962070 {
2097- pragma [ nomagic]
2098- private predicate testpotentialInstantiationOf0 (
2099- MethodCallCand mcc , ImplOrTraitItemNode i , AssocFunctionType selfType
2100- ) {
2101- exists (
2102- MethodCall mc , Method m , string name , int arity , TypePath strippedTypePath ,
2103- Type strippedType
2104- |
2105- mcc .hasSignature ( mc , strippedTypePath , strippedType , name , arity ) and
2106- mc = Debug:: getRelevantLocatable ( ) and
2107- methodCallBlanketLikeCandidate ( mc , m , i , selfType , _, _) and
2108- ReceiverSatisfiesBlanketLikeConstraint:: satisfiesBlanketConstraint ( mcc , i )
2109- )
2110- }
2111-
21122071 pragma [ nomagic]
21132072 additional predicate potentialInstantiationOf0 (
21142073 MethodCallCand mcc , ImplOrTraitItemNode i , AssocFunctionType selfType
@@ -2368,31 +2327,13 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi
23682327 result = this .getInferredNonSelfType ( apos , path )
23692328 }
23702329
2371- private Type testgetInferredType ( AccessPosition apos , TypePath path ) {
2372- this = Debug:: getRelevantLocatable ( ) and
2373- result = this .getInferredNonSelfType ( apos , path )
2374- }
2375-
23762330 Declaration getTarget ( ImplOrTraitItemNode i , string derefChainBorrow ) {
23772331 exists ( string derefChain , BorrowKind borrow |
23782332 derefChainBorrow = encodeDerefChainBorrow ( derefChain , borrow ) and
23792333 result = MkAssocFuntion ( i , this .resolveCallTarget ( i , derefChain , borrow ) ) // mutual recursion; resolving method calls requires resolving types and vice versa
23802334 )
23812335 }
23822336
2383- private Declaration testgetTarget (
2384- ImplOrTraitItemNode i , string derefChainBorrow , FunctionPosition pos , TypePath path , Type t
2385- ) {
2386- result = this .getTarget ( i , derefChainBorrow ) and
2387- this = Debug:: getRelevantLocatable ( ) and
2388- t = result .getDeclaredType ( pos , path )
2389- }
2390-
2391- private Declaration testgetTarget ( ImplOrTraitItemNode i , string derefChainBorrow ) {
2392- result = this .getTarget ( i , derefChainBorrow ) and
2393- this = Debug:: getRelevantLocatable ( )
2394- }
2395-
23962337 Declaration getTarget ( string derefChainBorrow ) { result = this .getTarget ( _, derefChainBorrow ) }
23972338
23982339 /**
@@ -3138,12 +3079,6 @@ private module OperationMatchingInput implements MatchingInputSig {
31383079 result = MkAssocFuntion ( i , this .resolveCallTarget ( i , _, _) ) // mutual recursion
31393080 )
31403081 }
3141-
3142- private Declaration testgetTarget ( FunctionPosition pos , TypePath path , Type t ) {
3143- result = this .getTarget ( ) and
3144- this = Debug:: getRelevantLocatable ( ) and
3145- t = result .getDeclaredType ( pos , path )
3146- }
31473082 }
31483083}
31493084
0 commit comments