diff options
| author | bors <bors@rust-lang.org> | 2021-03-23 02:01:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-23 02:01:14 +0000 |
| commit | 2bd94f4aa9683158c7df96b9661be193c39a55ed (patch) | |
| tree | ef88985b7237c4b6f77c27e17e9fbce5577d29f1 /compiler | |
| parent | 5d04957a4b4714f71d38326fc96a0b0ef6dc5800 (diff) | |
| parent | 263c85875cb3aceced6cc712961234fc61d71cba (diff) | |
| download | rust-2bd94f4aa9683158c7df96b9661be193c39a55ed.tar.gz rust-2bd94f4aa9683158c7df96b9661be193c39a55ed.zip | |
Auto merge of #83398 - JohnTitor:rollup-om80krv, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #80705 (Update Source Code Pro and include italics) - #81917 (Update RELEASES.md for 1.51.0) - #82732 (Remove theme.js file) - #83356 (rustdoc: Replace pair of `Option`s with an enum) - #83384 (rename :pat2018 -> :pat2015) - #83385 (:arrow_up: rust-analyzer) - #83389 (add rust-analyzer rustc_private option in librustdoc Cargo.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_ast/src/token.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_expand/src/mbe/macro_rules.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_expand/src/mbe/quoted.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/nonterminal.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs index 7e58426d27d..10d48a55bb5 100644 --- a/compiler/rustc_ast/src/token.rs +++ b/compiler/rustc_ast/src/token.rs @@ -688,13 +688,13 @@ pub enum NonterminalKind { Item, Block, Stmt, - Pat2018 { - /// Keep track of whether the user used `:pat2018` or `:pat` and we inferred it from the + Pat2015 { + /// Keep track of whether the user used `:pat2015` or `:pat` and we inferred it from the /// edition of the span. This is used for diagnostics. inferred: bool, }, Pat2021 { - /// Keep track of whether the user used `:pat2018` or `:pat` and we inferred it from the + /// Keep track of whether the user used `:pat2015` or `:pat` and we inferred it from the /// edition of the span. This is used for diagnostics. inferred: bool, }, @@ -722,11 +722,11 @@ impl NonterminalKind { sym::stmt => NonterminalKind::Stmt, sym::pat => match edition() { Edition::Edition2015 | Edition::Edition2018 => { - NonterminalKind::Pat2018 { inferred: true } + NonterminalKind::Pat2015 { inferred: true } } Edition::Edition2021 => NonterminalKind::Pat2021 { inferred: true }, }, - sym::pat2018 => NonterminalKind::Pat2018 { inferred: false }, + sym::pat2015 => NonterminalKind::Pat2015 { inferred: false }, sym::pat2021 => NonterminalKind::Pat2021 { inferred: false }, sym::expr => NonterminalKind::Expr, sym::ty => NonterminalKind::Ty, @@ -745,9 +745,9 @@ impl NonterminalKind { NonterminalKind::Item => sym::item, NonterminalKind::Block => sym::block, NonterminalKind::Stmt => sym::stmt, - NonterminalKind::Pat2018 { inferred: false } => sym::pat2018, + NonterminalKind::Pat2015 { inferred: false } => sym::pat2015, NonterminalKind::Pat2021 { inferred: false } => sym::pat2021, - NonterminalKind::Pat2018 { inferred: true } + NonterminalKind::Pat2015 { inferred: true } | NonterminalKind::Pat2021 { inferred: true } => sym::pat, NonterminalKind::Expr => sym::expr, NonterminalKind::Ty => sym::ty, diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs index 73fbde70bda..9ed478e6fcc 100644 --- a/compiler/rustc_expand/src/mbe/macro_rules.rs +++ b/compiler/rustc_expand/src/mbe/macro_rules.rs @@ -1080,7 +1080,7 @@ fn is_in_follow(tok: &mbe::TokenTree, kind: NonterminalKind) -> IsInFollow { _ => IsInFollow::No(TOKENS), } } - NonterminalKind::Pat2018 { .. } | NonterminalKind::Pat2021 { .. } => { + NonterminalKind::Pat2015 { .. } | NonterminalKind::Pat2021 { .. } => { 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 c8049495d22..e205cb65d02 100644 --- a/compiler/rustc_expand/src/mbe/quoted.rs +++ b/compiler/rustc_expand/src/mbe/quoted.rs @@ -63,13 +63,13 @@ pub(super) fn parse( let span = token.span.with_lo(start_sp.lo()); match frag.name { - sym::pat2018 | sym::pat2021 => { + sym::pat2015 | sym::pat2021 => { if !features.edition_macro_pats { feature_err( sess, sym::edition_macro_pats, frag.span, - "`pat2018` and `pat2021` are unstable.", + "`pat2015` and `pat2021` are unstable.", ) .emit(); } diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index f55ba22e7dd..fb08a7b8cea 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -611,7 +611,7 @@ declare_features! ( /// Allows arbitrary expressions in key-value attributes at parse time. (active, extended_key_value_attributes, "1.50.0", Some(78835), None), - /// `:pat2018` and `:pat2021` macro matchers. + /// `:pat2015` and `:pat2021` macro matchers. (active, edition_macro_pats, "1.51.0", Some(54883), None), /// Allows const generics to have default values (e.g. `struct Foo<const N: usize = 3>(...);`). diff --git a/compiler/rustc_parse/src/parser/nonterminal.rs b/compiler/rustc_parse/src/parser/nonterminal.rs index 464524e3c06..fc25e883666 100644 --- a/compiler/rustc_parse/src/parser/nonterminal.rs +++ b/compiler/rustc_parse/src/parser/nonterminal.rs @@ -61,7 +61,7 @@ impl<'a> Parser<'a> { }, _ => false, }, - NonterminalKind::Pat2018 { .. } | NonterminalKind::Pat2021 { .. } => match token.kind { + NonterminalKind::Pat2015 { .. } | NonterminalKind::Pat2021 { .. } => match token.kind { token::Ident(..) | // box, ref, mut, and other identifiers (can stricten) token::OpenDelim(token::Paren) | // tuple pattern token::OpenDelim(token::Bracket) | // slice pattern @@ -118,9 +118,9 @@ impl<'a> Parser<'a> { return Err(self.struct_span_err(self.token.span, "expected a statement")); } }, - NonterminalKind::Pat2018 { .. } | NonterminalKind::Pat2021 { .. } => { + NonterminalKind::Pat2015 { .. } | NonterminalKind::Pat2021 { .. } => { token::NtPat(self.collect_tokens_no_attrs(|this| match kind { - NonterminalKind::Pat2018 { .. } => this.parse_pat_no_top_alt(None), + NonterminalKind::Pat2015 { .. } => this.parse_pat_no_top_alt(None), NonterminalKind::Pat2021 { .. } => { this.parse_pat_allow_top_alt(None, RecoverComma::No) } diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index cd3dabb6795..42e01f1b8d1 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -845,7 +845,7 @@ symbols! { partial_ord, passes, pat, - pat2018, + pat2015, pat2021, path, pattern_parentheses, |
