diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-09-19 22:53:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-19 22:53:56 +0200 |
| commit | 02faee604455dd57d92d2361c9a25eabbeb60d33 (patch) | |
| tree | c2660e0499f5234d5b9f6e1a5d320feb7da7b779 | |
| parent | dc3c62a17939cd7dc1b55f8352401048ed034ad3 (diff) | |
| parent | 3ab89abac41443b125f2440b8f525f56536d8ffc (diff) | |
| download | rust-02faee604455dd57d92d2361c9a25eabbeb60d33.tar.gz rust-02faee604455dd57d92d2361c9a25eabbeb60d33.zip | |
Rollup merge of #146781 - joshtriplett:mbe-derive-fix-feature-gate, r=wesleywiser
mbe: Fix feature gate for `macro_derive`
| -rw-r--r-- | compiler/rustc_expand/src/mbe/macro_rules.rs | 2 | ||||
| -rw-r--r-- | tests/ui/feature-gates/feature-gate-macro-derive.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs index 946265eba8b..1d147a0385c 100644 --- a/compiler/rustc_expand/src/mbe/macro_rules.rs +++ b/compiler/rustc_expand/src/mbe/macro_rules.rs @@ -702,7 +702,7 @@ pub fn compile_declarative_macro( kinds |= MacroKinds::DERIVE; let derive_keyword_span = p.prev_token.span; if !features.macro_derive() { - feature_err(sess, sym::macro_attr, span, "`macro_rules!` derives are unstable") + feature_err(sess, sym::macro_derive, span, "`macro_rules!` derives are unstable") .emit(); } if let Some(guar) = check_no_eof(sess, &p, "expected `()` after `derive`") { diff --git a/tests/ui/feature-gates/feature-gate-macro-derive.stderr b/tests/ui/feature-gates/feature-gate-macro-derive.stderr index b7ca6717bd5..177518edafb 100644 --- a/tests/ui/feature-gates/feature-gate-macro-derive.stderr +++ b/tests/ui/feature-gates/feature-gate-macro-derive.stderr @@ -4,8 +4,8 @@ error[E0658]: `macro_rules!` derives are unstable LL | macro_rules! MyDerive { derive() {} => {} } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: see issue #83527 <https://github.com/rust-lang/rust/issues/83527> for more information - = help: add `#![feature(macro_attr)]` to the crate attributes to enable + = note: see issue #143549 <https://github.com/rust-lang/rust/issues/143549> for more information + = help: add `#![feature(macro_derive)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error |
