Skip to content

Commit 39b1a4a

Browse files
committed
wip
1 parent 9e4fb70 commit 39b1a4a

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ private module MethodCallResolution {
11831183
forall(Impl impl, FunctionPositionType self |
11841184
methodCandidate(rootType, name, arity, impl, self)
11851185
|
1186-
IsInstantiationOf<MethodCallCand, FunctionPositionType, MethodCallIsInstantiationOfInput>::isNotInstantiationOfStrict(MkMethodCallCand(this,
1186+
IsInstantiationOf<MethodCallCand, FunctionPositionType, MethodCallIsInstantiationOfInput>::isNotInstantiationOf(MkMethodCallCand(this,
11871187
derefChainBorrow), impl, self)
11881188
)
11891189
)
@@ -1199,7 +1199,7 @@ private module MethodCallResolution {
11991199
forall(Impl impl, FunctionPositionType self |
12001200
methodCandidate(rootType, name, arity, impl, self)
12011201
|
1202-
IsInstantiationOf<MethodCallCand, FunctionPositionType, MethodCallIsInstantiationOfInput>::isNotInstantiationOfStrict(MkMethodCallCand(this,
1202+
IsInstantiationOf<MethodCallCand, FunctionPositionType, MethodCallIsInstantiationOfInput>::isNotInstantiationOf(MkMethodCallCand(this,
12031203
derefChainBorrow), impl, self)
12041204
)
12051205
)

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -694,38 +694,8 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
694694
exists(Type t, TypePath path |
695695
t = resolveNthTypeAt(app, abs, tm, _, path) and
696696
not t = abs.getATypeParameter() and
697-
not path.isEmpty() and
698697
app.getTypeAt(path) != t
699698
)
700-
// or
701-
// // `app` uses inconsistent type parameter instantiations
702-
// exists(TypeParameter tp, Type t1, Type t2 |
703-
// potentialInstantiationOf(app, abs, tm) and
704-
// t1 = app.getTypeAt(getNthTypeParameterPath(tm, tp, _)) and
705-
// t2 = app.getTypeAt(getNthTypeParameterPath(tm, tp, _)) and
706-
// t1 != t2
707-
// )
708-
}
709-
710-
/**
711-
* Holds if `app` is _not_ a possible instantiation of `tm`.
712-
*/
713-
pragma[nomagic]
714-
predicate isNotInstantiationOfStrict(App app, TypeAbstraction abs, Constraint tm) {
715-
// `app` and `tm` differ on a concrete type
716-
exists(Type t, TypePath path |
717-
t = resolveNthTypeAt(app, abs, tm, _, path) and
718-
not t = abs.getATypeParameter() and
719-
app.getTypeAt(path) != t
720-
)
721-
// or
722-
// // `app` uses inconsistent type parameter instantiations
723-
// exists(TypeParameter tp, Type t1, Type t2 |
724-
// potentialInstantiationOf(app, abs, tm) and
725-
// t1 = app.getTypeAt(getNthTypeParameterPath(tm, tp, _)) and
726-
// t2 = app.getTypeAt(getNthTypeParameterPath(tm, tp, _)) and
727-
// t1 != t2
728-
// )
729699
}
730700
}
731701

0 commit comments

Comments
 (0)