run-pass 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 20:32:25 +01:00
parent cfeab2593b
commit ef5e8fc138
13 changed files with 19 additions and 0 deletions

View file

@ -11,6 +11,7 @@
// Check that we do not ICE when compiling this
// macro, which reuses the expression `$id`
#![feature(box_syntax)]
struct Foo {
a: int

View file

@ -12,6 +12,8 @@
// statement or end of block, as appropriate given the temporary
// lifetime rules.
#![feature(box_syntax)]
use std::ops::Drop;
static mut FLAGS: u64 = 0;

View file

@ -10,6 +10,8 @@
// Check that coercions are propagated through match and if expressions.
#![feature(box_syntax)]
pub fn main() {
let _: Box<[int]> = if true { box [1i, 2, 3] } else { box [1i] };

View file

@ -14,6 +14,7 @@
// boxes. Make sure that we don't free the box as we match the
// pattern.
#![feature(box_syntax)]
fn getaddr(box ref x: Box<uint>) -> *const uint {
let addr: *const uint = &*x;

View file

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

View file

@ -9,6 +9,7 @@
// except according to those terms.
#![feature(unboxed_closures)]
#![feature(box_syntax)]
use std::ops::{Deref, DerefMut};

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 foo(box (_x, _y): Box<(int, 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)]
pub fn main() {
match box 100i {
box x => {

View file

@ -11,6 +11,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
#![feature(box_syntax)]
// Tests that the new `box` syntax works with unique pointers.
use std::boxed::{Box, HEAP};

View file

@ -11,6 +11,7 @@
// Test lifetimes are linked properly when we create dependent region pointers.
// Issue #3148.
#![feature(box_syntax)]
struct A {
value: B

View file

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(box_syntax)]
struct Foo { a: int, b: int }
pub fn main() {

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 Foo {a: int, b: uint}

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 simple() {
match box true {
box true => { }