diff options
| author | bors <bors@rust-lang.org> | 2021-07-14 12:49:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-07-14 12:49:45 +0000 |
| commit | ee5ed4a88d6a869cdb152829ed697d6459650db3 (patch) | |
| tree | 5b1b52d013354284696ad275e73a78d6152c917c /compiler/rustc_expand | |
| parent | a08f25a7ef2800af5525762e981c24d96c14febe (diff) | |
| parent | afaca5ba79adeef77fea8c037c7449cbd1e77faa (diff) | |
| download | rust-ee5ed4a88d6a869cdb152829ed697d6459650db3.tar.gz rust-ee5ed4a88d6a869cdb152829ed697d6459650db3.zip | |
Auto merge of #87118 - JohnTitor:rollup-8ltidsq, r=JohnTitor
Rollup of 6 pull requests Successful merges: - #87085 (Search result colors) - #87090 (Make BTreeSet::split_off name elements like other set methods do) - #87098 (Unignore some pretty printing tests) - #87099 (Upgrade `cc` crate to 1.0.69) - #87101 (Suggest a path separator if a stray colon is found in a match arm) - #87102 (Add GUI test for "go to first" feature) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_expand')
| -rw-r--r-- | compiler/rustc_expand/src/expand.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index df673c6084b..1ab7e15019e 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -22,7 +22,9 @@ use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_data_structures::sync::Lrc; use rustc_errors::{Applicability, FatalError, PResult}; use rustc_feature::Features; -use rustc_parse::parser::{AttemptLocalParseRecovery, ForceCollect, Parser, RecoverComma}; +use rustc_parse::parser::{ + AttemptLocalParseRecovery, ForceCollect, Parser, RecoverColon, RecoverComma, +}; use rustc_parse::validate_attr; use rustc_session::lint::builtin::UNUSED_DOC_COMMENTS; use rustc_session::lint::BuiltinLintDiagnostics; @@ -930,9 +932,11 @@ pub fn parse_ast_fragment<'a>( } } AstFragmentKind::Ty => AstFragment::Ty(this.parse_ty()?), - AstFragmentKind::Pat => { - AstFragment::Pat(this.parse_pat_allow_top_alt(None, RecoverComma::No)?) - } + AstFragmentKind::Pat => AstFragment::Pat(this.parse_pat_allow_top_alt( + None, + RecoverComma::No, + RecoverColon::Yes, + )?), AstFragmentKind::Arms | AstFragmentKind::Fields | AstFragmentKind::FieldPats |
