Skip to content

Commit e318125

Browse files
committed
compile-fail tests: Add feature attributes to enable box pat/expr syntax in various tests.
1 parent ef5e8fc commit e318125

11 files changed

+17
-0
lines changed

src/test/compile-fail/borrowck-loan-in-overloaded-op.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(box_syntax)]
12+
1113
use std::ops::Add;
1214

1315
#[derive(Clone)]

src/test/compile-fail/borrowck-vec-pattern-nesting.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![feature(advanced_slice_patterns)]
12+
#![feature(box_syntax)]
1213

1314
fn a() {
1415
let mut vec = [box 1i, box 2, box 3];

src/test/compile-fail/destructure-trait-ref.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// The regression test for #15031 to make sure destructuring trait
1212
// reference work properly.
1313

14+
#![feature(box_syntax)]
15+
1416
trait T {}
1517
impl T for int {}
1618

src/test/compile-fail/issue-12116.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(box_syntax)]
12+
1113
enum IntList {
1214
Cons(int, Box<IntList>),
1315
Nil

src/test/compile-fail/issue-14084.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(box_syntax)]
12+
1113
fn main() {
1214
box ( () ) 0;
1315
//~^ ERROR: only the managed heap and exchange heap are currently supported

src/test/compile-fail/issue-3601.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(box_syntax)]
1112

1213
struct HTMLImageData {
1314
image: Option<String>

src/test/compile-fail/issue-4972.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(box_syntax)]
1112

1213
trait MyTrait { }
1314

src/test/compile-fail/issue-5100.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(box_syntax)]
12+
1113
enum A { B, C }
1214

1315
fn main() {

src/test/compile-fail/moves-based-on-type-block-bad.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// ignore-tidy-linelength
1212

13+
#![feature(box_syntax)]
14+
1315
struct S {
1416
x: Box<E>
1517
}

src/test/compile-fail/regions-ref-in-fn-arg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(box_syntax)]
1112

1213
fn arg_item(box ref x: Box<int>) -> &'static int {
1314
x //~^ ERROR borrowed value does not live long enough

src/test/compile-fail/unreachable-arm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// error-pattern:unreachable pattern
1212

13+
#![feature(box_syntax)]
1314

1415
enum foo { a(Box<foo>, int), b(uint), }
1516

0 commit comments

Comments
 (0)