Skip to content

Commit ef5e8fc

Browse files
committed
run-pass tests: Add feature attributes to enable box pat/expr syntax in various tests.
1 parent cfeab25 commit ef5e8fc

13 files changed

+19
-0
lines changed

src/test/run-pass/borrowck-macro-interaction-issue-6304.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// Check that we do not ICE when compiling this
1212
// macro, which reuses the expression `$id`
1313

14+
#![feature(box_syntax)]
1415

1516
struct Foo {
1617
a: int

src/test/run-pass/cleanup-rvalue-scopes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// statement or end of block, as appropriate given the temporary
1313
// lifetime rules.
1414

15+
#![feature(box_syntax)]
16+
1517
use std::ops::Drop;
1618

1719
static mut FLAGS: u64 = 0;

src/test/run-pass/coerce-match.rs

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

1111
// Check that coercions are propagated through match and if expressions.
1212

13+
#![feature(box_syntax)]
14+
1315
pub fn main() {
1416
let _: Box<[int]> = if true { box [1i, 2, 3] } else { box [1i] };
1517

src/test/run-pass/func-arg-ref-pattern.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// boxes. Make sure that we don't free the box as we match the
1515
// pattern.
1616

17+
#![feature(box_syntax)]
1718

1819
fn getaddr(box ref x: Box<uint>) -> *const uint {
1920
let addr: *const uint = &*x;

src/test/run-pass/issue-11552.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
#[derive(Clone)]
1314
enum Noun

src/test/run-pass/issue-16774.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(unboxed_closures)]
12+
#![feature(box_syntax)]
1213

1314
use std::ops::{Deref, DerefMut};
1415

src/test/run-pass/issue-6557.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 foo(box (_x, _y): Box<(int, int)>) {}
1314

src/test/run-pass/match-unique-bind.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
pub fn main() {
1214
match box 100i {
1315
box x => {

src/test/run-pass/new-box-syntax.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
/* Any copyright is dedicated to the Public Domain.
1212
* http://creativecommons.org/publicdomain/zero/1.0/ */
1313

14+
#![feature(box_syntax)]
15+
1416
// Tests that the new `box` syntax works with unique pointers.
1517

1618
use std::boxed::{Box, HEAP};

src/test/run-pass/regions-dependent-addr-of.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// Test lifetimes are linked properly when we create dependent region pointers.
1212
// Issue #3148.
1313

14+
#![feature(box_syntax)]
1415

1516
struct A {
1617
value: B

src/test/run-pass/unique-destructure.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
struct Foo { a: int, b: int }
1214

1315
pub fn main() {

src/test/run-pass/unique-pat-2.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 Foo {a: int, b: uint}
1314

src/test/run-pass/unique-pat.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 simple() {
1214
match box true {
1315
box true => { }

0 commit comments

Comments
 (0)