Skip to content

Commit 192d904

Browse files
committed
Rust: Adapt QL to AST changes
1 parent dd02ac3 commit 192d904

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module Impl {
4646
private predicate isMacroExpansion(AstNode macro, AstNode expansion) {
4747
expansion = macro.(MacroCall).getMacroCallExpansion()
4848
or
49-
expansion = macro.(Adt).getDeriveMacroExpansion(_)
49+
expansion = macro.(TypeItem).getDeriveMacroExpansion(_)
5050
or
5151
expansion = macro.(Item).getAttributeMacroExpansion()
5252
}

rust/ql/lib/codeql/rust/internal/PathResolution.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,9 +1796,9 @@ private module DollarCrateResolution {
17961796
macroDefPath = mc.getPath()
17971797
)
17981798
or
1799-
exists(ItemNode adt |
1800-
expansion = adt.(Adt).getDeriveMacroExpansion(_) and
1801-
macroDefPath = adt.getAttr("derive").getMeta().getPath()
1799+
exists(ItemNode type |
1800+
expansion = type.(TypeItem).getDeriveMacroExpansion(_) and
1801+
macroDefPath = type.getAttr("derive").getMeta().getPath()
18021802
)
18031803
}
18041804

0 commit comments

Comments
 (0)