diff --git a/rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll index f8aaf597ca2f..158a5ee96707 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll @@ -105,7 +105,7 @@ module Impl { not isAttributeMacroExpansionSourceLocation(macro, n.getLocation()) ) or - isFromMacroExpansion(getImmediatelyEnclosingMacroInvocation(n)) + isFromMacroExpansion(pragma[only_bind_into](getImmediatelyEnclosingMacroInvocation(n))) } cached