diff options
| author | bors <bors@rust-lang.org> | 2015-07-28 08:51:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-07-28 08:51:21 +0000 |
| commit | 5b72fa42d434e92e5fbb9fbd3b0995cc936ddcb9 (patch) | |
| tree | 5e0ce03e0e08c453eb3c8c8f470553c6cda98263 /src/libsyntax/parse/parser.rs | |
| parent | 79d5fefa2508212ec2cc46c1069819a988f23598 (diff) | |
| parent | cc09b1a08cc61dd3f485308adf3a5a252c718861 (diff) | |
| download | rust-5b72fa42d434e92e5fbb9fbd3b0995cc936ddcb9.tar.gz rust-5b72fa42d434e92e5fbb9fbd3b0995cc936ddcb9.zip | |
Auto merge of #27309 - eddyb:snapshot-infdef, r=alexcrichton
FreeBSD i386 snapshot is missing, failed tests (possibly spurious). r? @alexcrichton
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 04665140e2f..80a10b2463f 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2637,19 +2637,15 @@ impl<'a> Parser<'a> { // // ... but for now: check for a place: `box(PLACE) EXPR`. - if try!(self.eat(&token::OpenDelim(token::Paren)) ){ - // SNAP d4432b3 - // Enable this warning after snapshot ... - // - // let box_span = mk_sp(lo, self.last_span.hi); - // self.span_warn( - // box_span, - // "deprecated syntax; use the `in` keyword now \ - // (e.g. change `box (<expr>) <expr>` to \ - // `in <expr> { <expr> }`)"); + if try!(self.eat(&token::OpenDelim(token::Paren))) { + let box_span = mk_sp(lo, self.last_span.hi); + self.span_warn(box_span, + "deprecated syntax; use the `in` keyword now \ + (e.g. change `box (<expr>) <expr>` to \ + `in <expr> { <expr> }`)"); // Continue supporting `box () EXPR` (temporarily) - if !try!(self.eat(&token::CloseDelim(token::Paren)) ){ + if !try!(self.eat(&token::CloseDelim(token::Paren))) { let place = try!(self.parse_expr_nopanic()); try!(self.expect(&token::CloseDelim(token::Paren))); // Give a suggestion to use `box()` when a parenthesised expression is used |
