mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
23 lines
435 B
Plaintext
23 lines
435 B
Plaintext
private import rust
|
|
|
|
predicate toBeTested(Element e) {
|
|
not e instanceof CrateElement and
|
|
not e instanceof Builtin and
|
|
(
|
|
not e instanceof Locatable
|
|
or
|
|
e.(Locatable).fromSource()
|
|
)
|
|
}
|
|
|
|
class CrateElement extends Element {
|
|
CrateElement() {
|
|
this instanceof Crate or
|
|
this instanceof NamedCrate
|
|
}
|
|
}
|
|
|
|
class Builtin extends AstNode {
|
|
Builtin() { this.getFile().getAbsolutePath().matches("%/builtins/%.rs") }
|
|
}
|