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_ast | |
| parent | 3f7b98ebe0238e3bacbeedc57c76d825eabc689c (diff) | |
| download | rust-2a9db919ffb30ca09a015877b6ab2ffab5633249.tar.gz rust-2a9db919ffb30ca09a015877b6ab2ffab5633249.zip | |
remove pat2021
Diffstat (limited to 'compiler/rustc_ast')
| -rw-r--r-- | compiler/rustc_ast/src/token.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs index 3bd2d0fa324..15f46ef5d7f 100644 --- a/compiler/rustc_ast/src/token.rs +++ b/compiler/rustc_ast/src/token.rs @@ -693,11 +693,7 @@ pub enum NonterminalKind { /// edition of the span. This is used for diagnostics. inferred: bool, }, - Pat2021 { - /// Keep track of whether the user used `:pat_param` or `:pat` and we inferred it from the - /// edition of the span. This is used for diagnostics. - inferred: bool, - }, + PatWithOr, Expr, Ty, Ident, @@ -724,10 +720,9 @@ impl NonterminalKind { Edition::Edition2015 | Edition::Edition2018 => { NonterminalKind::PatParam { inferred: true } } - Edition::Edition2021 => NonterminalKind::Pat2021 { inferred: true }, + Edition::Edition2021 => NonterminalKind::PatWithOr, }, sym::pat_param => NonterminalKind::PatParam { inferred: false }, - sym::pat2021 => NonterminalKind::Pat2021 { inferred: false }, sym::expr => NonterminalKind::Expr, sym::ty => NonterminalKind::Ty, sym::ident => NonterminalKind::Ident, @@ -746,9 +741,7 @@ impl NonterminalKind { NonterminalKind::Block => sym::block, NonterminalKind::Stmt => sym::stmt, NonterminalKind::PatParam { inferred: false } => sym::pat_param, - NonterminalKind::Pat2021 { inferred: false } => sym::pat2021, - NonterminalKind::PatParam { inferred: true } - | NonterminalKind::Pat2021 { inferred: true } => sym::pat, + NonterminalKind::PatParam { inferred: true } | NonterminalKind::PatWithOr => sym::pat, NonterminalKind::Expr => sym::expr, NonterminalKind::Ty => sym::ty, NonterminalKind::Ident => sym::ident, |
