compile-fail tests: Add feature attributes to enable box pat/expr syntax in various tests.

This commit is contained in:
Felix S. Klock II 2015-01-07 22:35:56 +01:00
parent ef5e8fc138
commit e3181256d4
11 changed files with 17 additions and 0 deletions

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(box_syntax)]
use std::ops::Add;
#[derive(Clone)]

View File

@ -9,6 +9,7 @@
// except according to those terms.
#![feature(advanced_slice_patterns)]
#![feature(box_syntax)]
fn a() {
let mut vec = [box 1i, box 2, box 3];

View File

@ -11,6 +11,8 @@
// The regression test for #15031 to make sure destructuring trait
// reference work properly.
#![feature(box_syntax)]
trait T {}
impl T for int {}

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(box_syntax)]
enum IntList {
Cons(int, Box<IntList>),
Nil

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(box_syntax)]
fn main() {
box ( () ) 0;
//~^ ERROR: only the managed heap and exchange heap are currently supported

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(box_syntax)]
struct HTMLImageData {
image: Option<String>

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(box_syntax)]
trait MyTrait { }

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(box_syntax)]
enum A { B, C }
fn main() {

View File

@ -10,6 +10,8 @@
// ignore-tidy-linelength
#![feature(box_syntax)]
struct S {
x: Box<E>
}

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(box_syntax)]
fn arg_item(box ref x: Box<int>) -> &'static int {
x //~^ ERROR borrowed value does not live long enough

View File

@ -10,6 +10,7 @@
// error-pattern:unreachable pattern
#![feature(box_syntax)]
enum foo { a(Box<foo>, int), b(uint), }