Skip to content

Commit 44cbe82

Browse files
authored
Rollup merge of rust-lang#140067 - m-ou-se:remove-macro-2021-hack, r=Urgau
Remove (now unused) #[rustc_macro_edition_2021] attribute Now that rust-lang#139114 has been merged, we no longer need the temporary hack (`#[rustc_macro_edition_2021]`) that we introduced in rust-lang#138717. Time to remove it.
2 parents c7cb810 + 5f4d676 commit 44cbe82

File tree

7 files changed

+1
-40
lines changed

7 files changed

+1
-40
lines changed

compiler/rustc_attr_data_structures/src/attributes.rs

-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ pub enum AttributeKind {
191191
},
192192
MacroTransparency(Transparency),
193193
Repr(ThinVec<(ReprAttr, Span)>),
194-
RustcMacroEdition2021,
195194
Stability {
196195
stability: Stability,
197196
/// Span of the `#[stable(...)]` or `#[unstable(...)]` attribute

compiler/rustc_attr_parsing/src/attributes/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pub(crate) mod cfg;
2828
pub(crate) mod confusables;
2929
pub(crate) mod deprecation;
3030
pub(crate) mod repr;
31-
pub(crate) mod rustc;
3231
pub(crate) mod stability;
3332
pub(crate) mod transparency;
3433
pub(crate) mod util;

compiler/rustc_attr_parsing/src/attributes/rustc.rs

-19
This file was deleted.

compiler/rustc_attr_parsing/src/context.rs

-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use crate::attributes::allow_unstable::{AllowConstFnUnstableParser, AllowInterna
1515
use crate::attributes::confusables::ConfusablesParser;
1616
use crate::attributes::deprecation::DeprecationParser;
1717
use crate::attributes::repr::ReprParser;
18-
use crate::attributes::rustc::RustcMacroEdition2021Parser;
1918
use crate::attributes::stability::{
2019
BodyStabilityParser, ConstStabilityIndirectParser, ConstStabilityParser, StabilityParser,
2120
};
@@ -77,7 +76,6 @@ attribute_groups!(
7776
// tidy-alphabetical-start
7877
Single<ConstStabilityIndirectParser>,
7978
Single<DeprecationParser>,
80-
Single<RustcMacroEdition2021Parser>,
8179
Single<TransparencyParser>,
8280
// tidy-alphabetical-end
8381
];

compiler/rustc_feature/src/builtin_attrs.rs

-8
Original file line numberDiff line numberDiff line change
@@ -676,14 +676,6 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
676676
"`rustc_never_type_options` is used to experiment with never type fallback and work on \
677677
never type stabilization, and will never be stable"
678678
),
679-
rustc_attr!(
680-
rustc_macro_edition_2021,
681-
Normal,
682-
template!(Word),
683-
ErrorFollowing,
684-
EncodeCrossCrate::No,
685-
"makes spans in this macro edition 2021"
686-
),
687679

688680
// ==========================================================================
689681
// Internal attributes: Runtime related:

compiler/rustc_resolve/src/macros.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::sync::Arc;
88
use rustc_ast::expand::StrippedCfgItem;
99
use rustc_ast::{self as ast, Crate, NodeId, attr};
1010
use rustc_ast_pretty::pprust;
11-
use rustc_attr_parsing::{AttributeKind, StabilityLevel, find_attr};
11+
use rustc_attr_parsing::StabilityLevel;
1212
use rustc_data_structures::intern::Interned;
1313
use rustc_errors::{Applicability, DiagCtxtHandle, StashKey};
1414
use rustc_expand::base::{
@@ -1128,13 +1128,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
11281128
edition,
11291129
);
11301130

1131-
// The #[rustc_macro_edition_2021] attribute is used by the pin!() macro
1132-
// as a temporary workaround for a regression in expressiveness in Rust 2024.
1133-
// See https://github.com/rust-lang/rust/issues/138718.
1134-
if find_attr!(attrs.iter(), AttributeKind::RustcMacroEdition2021) {
1135-
ext.edition = Edition::Edition2021;
1136-
}
1137-
11381131
if let Some(builtin_name) = ext.builtin_name {
11391132
// The macro was marked with `#[rustc_builtin_macro]`.
11401133
if let Some(builtin_ext_kind) = self.builtin_macros.get(&builtin_name) {

compiler/rustc_span/src/symbol.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,6 @@ symbols! {
18241824
rustc_lint_opt_ty,
18251825
rustc_lint_query_instability,
18261826
rustc_lint_untracked_query_information,
1827-
rustc_macro_edition_2021,
18281827
rustc_macro_transparency,
18291828
rustc_main,
18301829
rustc_mir,

0 commit comments

Comments
 (0)