Files
codeql/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql
2025-06-25 12:02:13 +02:00

31 lines
950 B
Plaintext
Generated

// generated by codegen, do not edit
import codeql.rust.elements
import TestUtils
query predicate instances(
SelfParam x, string isRef__label, string isRef, string isMut__label, string isMut
) {
toBeTested(x) and
not x.isUnknown() and
isRef__label = "isRef:" and
(if x.isRef() then isRef = "yes" else isRef = "no") and
isMut__label = "isMut:" and
if x.isMut() then isMut = "yes" else isMut = "no"
}
query predicate getAttr(SelfParam x, int index, Attr getAttr) {
toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index)
}
query predicate getTypeRepr(SelfParam x, TypeRepr getTypeRepr) {
toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr()
}
query predicate getLifetime(SelfParam x, Lifetime getLifetime) {
toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime()
}
query predicate getName(SelfParam x, Name getName) {
toBeTested(x) and not x.isUnknown() and getName = x.getName()
}