Skip to content

Commit b13cf2b

Browse files
committed
cleanup
1 parent 7dd4b1e commit b13cf2b

File tree

1 file changed

+0
-65
lines changed

1 file changed

+0
-65
lines changed

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

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,22 +1632,6 @@ private module MethodResolution{
16321632
)
16331633
}
16341634

1635-
privatepredicatetesthasNoCompatibleTargetNoBorrow(stringderefChain){
1636-
exists(TypePathstrippedTypePath,TypestrippedType,ImplItemNodei|
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
notresult=TUnknownType()
19661950
}
19671951

1968-
privateTypetestgetTypeAt(TypePathpath){
1969-
result=this.getTypeAt(path)and
1970-
mc_= Debug::getRelevantLocatable()
1971-
}
1972-
19731952
pragma[nomagic]
19741953
predicatehasNoCompatibleNonBlanketTarget(){
19751954
mc_.hasNoCompatibleNonBlanketTargetSharedBorrow(derefChain)and
@@ -2042,11 +2021,6 @@ private module MethodResolution{
20422021
)
20432022
}
20442023

2045-
privateMethodtestresolveCallTarget(ImplOrTraitItemNodei){
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
MethodresolveCallTarget(ImplOrTraitItemNodei){
@@ -2094,21 +2068,6 @@ private module MethodResolution{
20942068
privatemodule ReceiverIsInstantiationOfSelfParamInput implements
20952069
IsInstantiationOfInputSig<MethodCallCand,AssocFunctionType>
20962070
{
2097-
pragma[nomagic]
2098-
privatepredicatetestpotentialInstantiationOf0(
2099-
MethodCallCandmcc,ImplOrTraitItemNodei,AssocFunctionTypeselfType
2100-
){
2101-
exists(
2102-
MethodCallmc,Methodm,stringname,intarity,TypePathstrippedTypePath,
2103-
TypestrippedType
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
additionalpredicatepotentialInstantiationOf0(
21142073
MethodCallCandmcc,ImplOrTraitItemNodei,AssocFunctionTypeselfType
@@ -2368,31 +2327,13 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi
23682327
result=this.getInferredNonSelfType(apos,path)
23692328
}
23702329

2371-
privateTypetestgetInferredType(AccessPositionapos,TypePathpath){
2372-
this= Debug::getRelevantLocatable()and
2373-
result=this.getInferredNonSelfType(apos,path)
2374-
}
2375-
23762330
DeclarationgetTarget(ImplOrTraitItemNodei,stringderefChainBorrow){
23772331
exists(stringderefChain,BorrowKindborrow|
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-
privateDeclarationtestgetTarget(
2384-
ImplOrTraitItemNodei,stringderefChainBorrow,FunctionPositionpos,TypePathpath,Typet
2385-
){
2386-
result=this.getTarget(i,derefChainBorrow)and
2387-
this= Debug::getRelevantLocatable()and
2388-
t=result.getDeclaredType(pos,path)
2389-
}
2390-
2391-
privateDeclarationtestgetTarget(ImplOrTraitItemNodei,stringderefChainBorrow){
2392-
result=this.getTarget(i,derefChainBorrow)and
2393-
this= Debug::getRelevantLocatable()
2394-
}
2395-
23962337
DeclarationgetTarget(stringderefChainBorrow){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-
privateDeclarationtestgetTarget(FunctionPositionpos,TypePathpath,Typet){
3143-
result=this.getTarget()and
3144-
this= Debug::getRelevantLocatable()and
3145-
t=result.getDeclaredType(pos,path)
3146-
}
31473082
}
31483083
}
31493084

0 commit comments

Comments
(0)