Rust: Address PR comments

This commit is contained in:
Simon Friis Vindum
2025-02-04 10:19:04 +01:00
parent fc15c0d3b2
commit 07413315a1
3 changed files with 6 additions and 4 deletions

View File

@@ -20,7 +20,9 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
Type getType() { any() }
Callable getEnclosingCallable() { result = super.getEnclosingCallable().asCfgScope() }
Callable getEnclosingCallable() {
result = this.(Node::Node).getEnclosingCallable().asCfgScope()
}
}
private predicate relevant(Function api) {
@@ -91,7 +93,7 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
}
Callable returnNodeEnclosingCallable(DataFlow::Node ret) {
result = ret.getEnclosingCallable().asCfgScope()
result = ret.(Node::Node).getEnclosingCallable().asCfgScope()
}
predicate isOwnInstanceAccessNode(RustDataFlow::ReturnNode node) {