summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-07-04 00:56:57 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-07-04 00:56:57 -0700
commit29ec2506abb1d382e432cae2519aa7b7695c276a (patch)
tree8548c1ac829f431dd07f930f8c0de909448b57cd /src/libsyntax/parse/parser.rs
parent1bff1ff810dcfa8064c11e2b84473f053d1f69f1 (diff)
downloadrust-29ec2506abb1d382e432cae2519aa7b7695c276a.tar.gz
rust-29ec2506abb1d382e432cae2519aa7b7695c276a.zip
librustc: Remove the `&LIFETIME EXPR` production from the language.
This was parsed by the parser but completely ignored; not even stored in
the AST!

This breaks code that looks like:

    static X: &'static [u8] = &'static [1, 2, 3];

Change this code to the shorter:

    static X: &'static [u8] = &[1, 2, 3];

Closes #15312.

[breaking-change]
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index f3789e25bc8..960971b94d2 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2400,7 +2400,6 @@ impl<'a> Parser<'a> {
           }
           token::BINOP(token::AND) | token::ANDAND => {
             self.expect_and();
-            let _lt = self.parse_opt_lifetime();
             let m = self.parse_mutability();
             let e = self.parse_prefix_expr();
             hi = e.span.hi;