mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-04 17:22:19 +00:00
fix macro attribute feature-gate span Fixes rust-lang/rust#147135. Issue rust-lang/rust#147135 reports a misleading feature-gate diagnostic for cross-crate `macro_rules!` macro attributes. This misleading feature-gate diagnostic causes rustc to point at the macro definition instead of user’s attribute call site. My PR makes sure externally defined `macro_rules!` attributes are gated at the invocation span. Regression test verifies that the primary error points at the downstream `#[foo::identity]` attribute use