diff options
| author | mark <markm@cs.wisc.edu> | 2021-04-27 21:15:59 -0500 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2021-04-27 21:15:59 -0500 |
| commit | 2a9db919ffb30ca09a015877b6ab2ffab5633249 (patch) | |
| tree | 334b473a1325e11035e265d9145baaa66e96f3fe /compiler/rustc_expand/src | |
| parent | 3f7b98ebe0238e3bacbeedc57c76d825eabc689c (diff) | |
| download | rust-2a9db919ffb30ca09a015877b6ab2ffab5633249.tar.gz rust-2a9db919ffb30ca09a015877b6ab2ffab5633249.zip | |
remove pat2021
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() |
