diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-07-04 00:56:57 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-07-04 00:56:57 -0700 |
| commit | 29ec2506abb1d382e432cae2519aa7b7695c276a (patch) | |
| tree | 8548c1ac829f431dd07f930f8c0de909448b57cd /src/test/compile-fail/check-static-values-constraints.rs | |
| parent | 1bff1ff810dcfa8064c11e2b84473f053d1f69f1 (diff) | |
| download | rust-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.rs | 4 |
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 |
