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

27 lines
781 B
Plaintext
Generated

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