attribute macro's call_site()
hygiene should come from the macro's name, not the #[]
#134882
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-hygiene
Area: Macro hygiene
A-proc-macros
Area: Procedural macros
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
I tried this code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ade138e8d44ac15e91fb351253675a23
my-macros/lib.rs
:my-code/lib.rs
:I expected to see this happen: compile without error because the attribute macro adds the
arg
argument to the function definition and the hygiene used is frommy_attr
in the invocation ofm!
Instead, this happened: got an error:
Meta
rustc version 1.83.0 on playground
also has same issue on
1.85.0-nightly (2024-12-28 8742e0556dee3c64f714)
on playgroundThe text was updated successfully, but these errors were encountered: