Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb64809c

Browse files
committed
Rust: Adapt QL to AST changes
1 parentdd02ac3 commitb64809c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
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
privatepredicateisMacroExpansion(AstNodemacro,AstNodeexpansion){
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(ItemNodeadt|
1800-
expansion=adt.(Adt).getDeriveMacroExpansion(_)and
1801-
macroDefPath=adt.getAttr("derive").getMeta().getPath()
1799+
exists(ItemNodetype|
1800+
expansion=type.(TypeItem).getDeriveMacroExpansion(_)and
1801+
macroDefPath=type.getAttr("derive").getMeta().getPath()
18021802
)
18031803
}
18041804

‎rust/ql/test/extractor-tests/macro-expansion/test.ql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ query predicate attribute_macros(Item i, int index, Item expanded) {
55
i.fromSource()andexpanded=i.getAttributeMacroExpansion().getItem(index)
66
}
77

8-
querypredicatederive_macros(Adti,intindex,intsubIndex,Itemexpanded){
8+
querypredicatederive_macros(TypeItemi,intindex,intsubIndex,Itemexpanded){
99
i.fromSource()andexpanded=i.getDeriveMacroExpansion(index).getItem(subIndex)
1010
}
1111

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp