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

60 lines
2.1 KiB
Plaintext
Generated

// generated by codegen, do not edit
import codeql.rust.elements
import TestUtils
query predicate instances(
Impl x, string isConst__label, string isConst, string isDefault__label, string isDefault,
string isUnsafe__label, string isUnsafe
) {
toBeTested(x) and
not x.isUnknown() and
isConst__label = "isConst:" and
(if x.isConst() then isConst = "yes" else isConst = "no") and
isDefault__label = "isDefault:" and
(if x.isDefault() then isDefault = "yes" else isDefault = "no") and
isUnsafe__label = "isUnsafe:" and
if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no"
}
query predicate getExtendedCanonicalPath(Impl x, string getExtendedCanonicalPath) {
toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath()
}
query predicate getCrateOrigin(Impl x, string getCrateOrigin) {
toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin()
}
query predicate getAttributeMacroExpansion(Impl x, MacroItems getAttributeMacroExpansion) {
toBeTested(x) and
not x.isUnknown() and
getAttributeMacroExpansion = x.getAttributeMacroExpansion()
}
query predicate getAssocItemList(Impl x, AssocItemList getAssocItemList) {
toBeTested(x) and not x.isUnknown() and getAssocItemList = x.getAssocItemList()
}
query predicate getAttr(Impl x, int index, Attr getAttr) {
toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index)
}
query predicate getGenericParamList(Impl x, GenericParamList getGenericParamList) {
toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList()
}
query predicate getSelfTy(Impl x, TypeRepr getSelfTy) {
toBeTested(x) and not x.isUnknown() and getSelfTy = x.getSelfTy()
}
query predicate getTrait(Impl x, TypeRepr getTrait) {
toBeTested(x) and not x.isUnknown() and getTrait = x.getTrait()
}
query predicate getVisibility(Impl x, Visibility getVisibility) {
toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility()
}
query predicate getWhereClause(Impl x, WhereClause getWhereClause) {
toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause()
}