compile-fail tests: Add feature attributes to enable box pat/expr syntax in various tests.
This commit is contained in:
parent
ef5e8fc138
commit
e3181256d4
@ -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)]
|
||||
|
@ -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];
|
||||
|
@ -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 {}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -8,6 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(box_syntax)]
|
||||
|
||||
trait MyTrait { }
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
// ignore-tidy-linelength
|
||||
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct S {
|
||||
x: Box<E>
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
// error-pattern:unreachable pattern
|
||||
|
||||
#![feature(box_syntax)]
|
||||
|
||||
enum foo { a(Box<foo>, int), b(uint), }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user