Skip to content

Commit 06b99b2

Browse files
authored
Merge pull request #21180 from hvitved/rust/fix-bad-join2
Rust: Fix bad join
2 parents 1c689d0 + 43e2017 commit 06b99b2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,11 @@ module Impl {
9999
*/
100100
cached
101101
predicate isFromMacroExpansion(AstNode n) {
102-
exists(AstNode macro |
102+
exists(AstNode macro, Location l |
103103
macro = getImmediatelyEnclosingMacroInvocation(n) and
104104
not n = getATokenTreeNode(macro) and
105-
not isAttributeMacroExpansionSourceLocation(macro, n.getLocation())
105+
l = n.getLocation() and
106+
not isAttributeMacroExpansionSourceLocation(macro, l)
106107
)
107108
or
108109
isFromMacroExpansion(pragma[only_bind_into](getImmediatelyEnclosingMacroInvocation(n)))

0 commit comments

Comments
 (0)