run-pass tests: Add feature attributes to enable box pat/expr syntax in various tests.
This commit is contained in:
parent
cfeab2593b
commit
ef5e8fc138
13 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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] };
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
#![feature(unboxed_closures)]
|
||||
#![feature(box_syntax)]
|
||||
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
|
|
|
@ -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)>) {}
|
||||
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
// Test lifetimes are linked properly when we create dependent region pointers.
|
||||
// Issue #3148.
|
||||
|
||||
#![feature(box_syntax)]
|
||||
|
||||
struct A {
|
||||
value: B
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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}
|
||||
|
||||
|
|
|
@ -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 => { }
|
||||
|
|
Loading…
Add table
Reference in a new issue