diff options
| author | bors <bors@rust-lang.org> | 2020-03-15 17:27:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-15 17:27:47 +0000 |
| commit | e0f5df017368dc3f7cb458fc6d5a5e0420e1d2e5 (patch) | |
| tree | 9c345daf32ba2b8a08337ccac954bb9ae905ca48 /src/librustc_parse/parser/pat.rs | |
| parent | 5da2e53f471f5eea60f534845b90c97ecabb71cb (diff) | |
| parent | bde77af0944e7b6f666b64f92bc30f8fd55296d2 (diff) | |
Auto merge of #70024 - Centril:rollup-cppmaxr, r=Centril
Rollup of 8 pull requests Successful merges: - #69528 (Add undo_leak to reset RefCell borrow state) - #69589 (ast: `Mac`/`Macro` -> `MacCall`) - #69661 (Implement From<&mut str> for String) - #69988 (rustc_metadata: Remove `rmeta::MacroDef`) - #70006 (resolve: Fix two issues in fresh binding disambiguation) - #70011 (def_collector: Fully visit async functions) - #70013 (Return feature gate as a `Symbol` ) - #70018 (Fix "since" field for `Once::is_complete`'s `#[stable]` attribute) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_parse/parser/pat.rs')
| -rw-r--r-- | src/librustc_parse/parser/pat.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/librustc_parse/parser/pat.rs b/src/librustc_parse/parser/pat.rs index 5f2b3b03488..4585941943b 100644 --- a/src/librustc_parse/parser/pat.rs +++ b/src/librustc_parse/parser/pat.rs @@ -1,9 +1,7 @@ use super::{Parser, PathStyle}; use crate::{maybe_recover_from_interpolated_ty_qpath, maybe_whole}; -use rustc_ast::ast::{ - self, AttrVec, Attribute, FieldPat, Mac, Pat, PatKind, RangeEnd, RangeSyntax, -}; -use rustc_ast::ast::{BindingMode, Expr, ExprKind, Ident, Mutability, Path, QSelf}; +use rustc_ast::ast::{self, AttrVec, Attribute, FieldPat, MacCall, Pat, PatKind, RangeEnd}; +use rustc_ast::ast::{BindingMode, Expr, ExprKind, Ident, Mutability, Path, QSelf, RangeSyntax}; use rustc_ast::mut_visit::{noop_visit_mac, noop_visit_pat, MutVisitor}; use rustc_ast::ptr::P; use rustc_ast::token; @@ -540,7 +538,7 @@ impl<'a> Parser<'a> { fn make_all_value_bindings_mutable(pat: &mut P<Pat>) -> bool { struct AddMut(bool); impl MutVisitor for AddMut { - fn visit_mac(&mut self, mac: &mut Mac) { + fn visit_mac(&mut self, mac: &mut MacCall) { noop_visit_mac(mac, self); } @@ -597,8 +595,8 @@ impl<'a> Parser<'a> { fn parse_pat_mac_invoc(&mut self, path: Path) -> PResult<'a, PatKind> { self.bump(); let args = self.parse_mac_args()?; - let mac = Mac { path, args, prior_type_ascription: self.last_type_ascription }; - Ok(PatKind::Mac(mac)) + let mac = MacCall { path, args, prior_type_ascription: self.last_type_ascription }; + Ok(PatKind::MacCall(mac)) } fn fatal_unexpected_non_pat( |
