diff options
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/mbe/macro_rules.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_expand/src/mbe/quoted.rs | 16 |
2 files changed, 3 insertions, 15 deletions
diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs index 7a2fa3d2475..91d4a0f0d65 100644 --- a/compiler/rustc_expand/src/mbe/macro_rules.rs +++ b/compiler/rustc_expand/src/mbe/macro_rules.rs @@ -1116,7 +1116,7 @@ fn is_in_follow(tok: &mbe::TokenTree, kind: NonterminalKind) -> IsInFollow { _ => IsInFollow::No(TOKENS), } } - NonterminalKind::Pat2021 { .. } => { + NonterminalKind::PatWithOr { .. } => { const TOKENS: &[&str] = &["`=>`", "`,`", "`=`", "`if`", "`in`"]; match tok { TokenTree::Token(token) => match token.kind { diff --git a/compiler/rustc_expand/src/mbe/quoted.rs b/compiler/rustc_expand/src/mbe/quoted.rs index c3e7448b630..aca02ef93f8 100644 --- a/compiler/rustc_expand/src/mbe/quoted.rs +++ b/compiler/rustc_expand/src/mbe/quoted.rs @@ -6,8 +6,8 @@ use rustc_ast::tokenstream; use rustc_ast::{NodeId, DUMMY_NODE_ID}; use rustc_ast_pretty::pprust; use rustc_feature::Features; -use rustc_session::parse::{feature_err, ParseSess}; -use rustc_span::symbol::{kw, sym, Ident}; +use rustc_session::parse::ParseSess; +use rustc_span::symbol::{kw, Ident}; use rustc_span::Span; @@ -62,18 +62,6 @@ pub(super) fn parse( Some((frag, _)) => { let span = token.span.with_lo(start_sp.lo()); - if matches!(frag.name, sym::pat2021) - && !features.edition_macro_pats - { - feature_err( - sess, - sym::edition_macro_pats, - frag.span, - "`pat2021` is unstable.", - ) - .emit(); - } - let kind = token::NonterminalKind::from_symbol(frag.name, || { span.edition() |
