diff options
| author | bors <bors@rust-lang.org> | 2015-11-01 13:36:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-01 13:36:49 +0000 |
| commit | 6d43fef3aaf64b2e7df14ca676a3a39b723ed7f3 (patch) | |
| tree | c49e644a1cff508f4bf9ea482cb2a358e34fef23 /src/libsyntax/parse | |
| parent | a5fbb3a25faeb08f50f571a6aa227f14a9d086c2 (diff) | |
| parent | 306b0efc44f788df2c95553920eddb0bee0bf665 (diff) | |
| download | rust-6d43fef3aaf64b2e7df14ca676a3a39b723ed7f3.tar.gz rust-6d43fef3aaf64b2e7df14ca676a3a39b723ed7f3.zip | |
Auto merge of #29486 - petrochenkov:multiwild, r=Manishearth
Motivation: - It is not actually a pattern - It is not actually needed, except for... Drawback: - Slice patterns like `[a, _.., b]` are pretty-printed as `[a, .., b]`. Great loss :( plugin-[breaking-change], as always
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index d1fc8ac2002..ba86f85c381 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -41,8 +41,7 @@ use ast::{MutImmutable, MutMutable, Mac_}; use ast::{MutTy, BiMul, Mutability}; use ast::{MethodImplItem, NamedField, UnNeg, NoReturn, UnNot}; use ast::{Pat, PatBox, PatEnum, PatIdent, PatLit, PatQPath, PatMac, PatRange}; -use ast::{PatRegion, PatStruct, PatTup, PatVec, PatWild, PatWildMulti}; -use ast::PatWildSingle; +use ast::{PatRegion, PatStruct, PatTup, PatVec, PatWild}; use ast::{PolyTraitRef, QSelf}; use ast::{Return, BiShl, BiShr, Stmt, StmtDecl}; use ast::{StmtExpr, StmtSemi, StmtMac, VariantData, StructField}; @@ -3078,7 +3077,7 @@ impl<'a> Parser<'a> { self.check(&token::CloseDelim(token::Bracket)) { slice = Some(P(ast::Pat { id: ast::DUMMY_NODE_ID, - node: PatWild(PatWildMulti), + node: PatWild, span: self.span, })); before_slice = false; @@ -3215,7 +3214,7 @@ impl<'a> Parser<'a> { token::Underscore => { // Parse _ try!(self.bump()); - pat = PatWild(PatWildSingle); + pat = PatWild; } token::BinOp(token::And) | token::AndAnd => { // Parse &pat / &mut pat |
