about summary refs log tree commit diff
path: root/src/test/compile-fail/check-static-values-constraints.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/test/compile-fail/check-static-values-constraints.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/test/compile-fail/check-static-values-constraints.rs')
-rw-r--r--src/test/compile-fail/check-static-values-constraints.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/compile-fail/check-static-values-constraints.rs b/src/test/compile-fail/check-static-values-constraints.rs
index da5f7680d8c..b7344d72a46 100644
--- a/src/test/compile-fail/check-static-values-constraints.rs
+++ b/src/test/compile-fail/check-static-values-constraints.rs
@@ -113,12 +113,12 @@ static mut STATIC14: SafeStruct = SafeStruct {
     field2: Variant4("str".to_string())
 };
 
-static STATIC15: &'static [Box<MyOwned>] = &'static [box MyOwned, box MyOwned];
+static STATIC15: &'static [Box<MyOwned>] = &[box MyOwned, box MyOwned];
 //~^ ERROR static items are not allowed to have custom pointers
 //~^^ ERROR static items are not allowed to have custom pointers
 
 static STATIC16: (&'static Box<MyOwned>, &'static Box<MyOwned>) =
-    (&'static box MyOwned, &'static box MyOwned);
+    (&box MyOwned, &box MyOwned);
 //~^ ERROR static items are not allowed to have custom pointers
 //~^^ ERROR static items are not allowed to have custom pointers