mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Rust: Remove TC from ImplTraitTypeRepr.isInReturnPos
This commit is contained in:
@@ -23,14 +23,18 @@ module Impl {
|
|||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
class ImplTraitTypeRepr extends Generated::ImplTraitTypeRepr {
|
class ImplTraitTypeRepr extends Generated::ImplTraitTypeRepr {
|
||||||
/** Gets the function for which this impl trait type occurs, if any. */
|
pragma[nomagic]
|
||||||
Function getFunction() {
|
private TypeRepr getFunctionTypeRepr(Function f) {
|
||||||
this.getParentNode*() = [result.getRetType().getTypeRepr(), result.getAParam().getTypeRepr()]
|
this.getParentNode*() = result and
|
||||||
|
result = [f.getRetType().getTypeRepr(), f.getAParam().getTypeRepr()]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Gets the function for which this impl trait type occurs, if any. */
|
||||||
|
Function getFunction() { exists(this.getFunctionTypeRepr(result)) }
|
||||||
|
|
||||||
/** Holds if this impl trait type occurs in the return type of a function. */
|
/** Holds if this impl trait type occurs in the return type of a function. */
|
||||||
predicate isInReturnPos() {
|
predicate isInReturnPos() {
|
||||||
this.getParentNode*() = this.getFunction().getRetType().getTypeRepr()
|
exists(Function f | f.getRetType().getTypeRepr() = this.getFunctionTypeRepr(f))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user