diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-21 15:48:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-21 15:48:57 +0100 |
| commit | 7c2475e9aa46d72a929fd56b6ba8c5304ab96804 (patch) | |
| tree | 4b10f6496edc2848dc9d6ec86ed81e2f316705c3 /compiler/rustc_feature/src | |
| parent | a27b21e53a896920ec111dcaf743ae1d3a2e4943 (diff) | |
| parent | 0577300b414f43f2384fd4f29cd1f3ed0d406169 (diff) | |
| download | rust-7c2475e9aa46d72a929fd56b6ba8c5304ab96804.tar.gz rust-7c2475e9aa46d72a929fd56b6ba8c5304ab96804.zip | |
Rollup merge of #138717 - jdonszelmann:pin-macro, r=WaffleLapkin
Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it Fixes a regression, see issue below. This is a temporary fix, super let is the real solution. Closes #138596
Diffstat (limited to 'compiler/rustc_feature/src')
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 5430bfde785..fd936458f11 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -661,6 +661,14 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ "`rustc_never_type_options` is used to experiment with never type fallback and work on \ never type stabilization, and will never be stable" ), + rustc_attr!( + rustc_macro_edition_2021, + Normal, + template!(Word), + ErrorFollowing, + EncodeCrossCrate::No, + "makes spans in this macro edition 2021" + ), // ========================================================================== // Internal attributes: Runtime related: |
