Skip to content

Commit a7a2dd9

Browse files
committed
fallout: run-pass tests that use box. (many could be ported to Box::new instead in the future.)
1 parent bfd6f95 commit a7a2dd9

File tree

245 files changed

+605
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+605
-4
lines changed

src/test/auxiliary/cci_nested_lib.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
use std::cell::RefCell;
1315

src/test/auxiliary/issue-2380.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#![crate_name="a"]
1212
#![crate_type = "lib"]
1313

14+
#![allow(unknown_features)]
15+
#![feature(box_syntax)]
1416

1517
pub trait i<T> { }
1618

src/test/auxiliary/method_self_arg1.rs

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
#![crate_type = "lib"]
1212

13+
#![allow(unknown_features)]
14+
#![feature(box_syntax)]
15+
1316
static mut COUNT: u64 = 1;
1417

1518
pub fn get_count() -> u64 { unsafe { COUNT } }

src/test/auxiliary/method_self_arg2.rs

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
#![crate_type = "lib"]
1212

13+
#![allow(unknown_features)]
14+
#![feature(box_syntax)]
15+
1316
static mut COUNT: u64 = 1;
1417

1518
pub fn get_count() -> u64 { unsafe { COUNT } }

src/test/run-pass/alignment-gep-tup-like-1.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
struct pair<A,B> {
1215
a: A, b: B
1316
}

src/test/run-pass/assert-eq-macro-success.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
#[derive(PartialEq, Show)]
1315
struct Point { x : int }

src/test/run-pass/associated-type-doubleendediterator-object.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
fn pairwise_sub(mut t: Box<DoubleEndedIterator<Item=int>>) -> int {
1215
let mut result = 0;
1316
loop {

src/test/run-pass/autoderef-method-on-trait.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
trait double {
1315
fn double(self: Box<Self>) -> uint;

src/test/run-pass/autoderef-method-priority.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
trait double {
1315
fn double(self) -> uint;

src/test/run-pass/autoderef-method-twice-but-not-thrice.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
trait double {
1315
fn double(self: Box<Self>) -> uint;

src/test/run-pass/autoderef-method-twice.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
trait double {
1215
fn double(self: Box<Self>) -> uint;
1316
}

src/test/run-pass/autoderef-method.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
trait double {
1215
fn double(self: Box<Self>) -> uint;
1316
}

src/test/run-pass/autoref-intermediate-types-issue-3585.rs

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// except according to those terms.
1010

1111

12+
#![allow(unknown_features)]
13+
#![feature(box_syntax)]
14+
1215
trait Foo {
1316
fn foo(&self) -> String;
1417
}

src/test/run-pass/bitv-perf-test.rs

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12+
#![allow(unknown_features)]
13+
#![feature(box_syntax)]
14+
1215
extern crate collections;
1316
use std::collections::Bitv;
1417

src/test/run-pass/borrowck-borrow-from-expr-block.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
fn borrow<F>(x: &int, f: F) where F: FnOnce(&int) {
1315
f(x)

src/test/run-pass/borrowck-field-sensitivity.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
struct A { a: int, b: Box<int> }
1215
struct B { a: Box<int>, b: Box<int> }
1316

src/test/run-pass/borrowck-move-by-capture-ok.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113
#![feature(unboxed_closures)]
1214

1315
pub fn main() {

src/test/run-pass/borrowck-mut-uniq.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
use std::mem::swap;
1215

1316
#[derive(Show)]

src/test/run-pass/borrowck-use-mut-borrow.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
struct A { a: int, b: Box<int> }
1215

1316
fn field_copy_after_field_borrow() {

src/test/run-pass/cancel-clean-via-immediate-rvalue-ref.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
fn foo(x: &mut Box<u8>) {
1315
*x = box 5;

src/test/run-pass/capturing-logging.rs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// ignore-android (FIXME #11419)
1212
// exec-env:RUST_LOG=info
1313

14+
#![allow(unknown_features)]
15+
#![feature(box_syntax)]
16+
1417
#[macro_use]
1518
extern crate log;
1619

src/test/run-pass/cci_borrow.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// aux-build:cci_borrow_lib.rs
1212

13+
#![allow(unknown_features)]
14+
#![feature(box_syntax)]
1315

1416
extern crate cci_borrow_lib;
1517
use cci_borrow_lib::foo;

src/test/run-pass/class-cast-to-trait-cross-crate-2.rs

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
// except according to those terms.
1010

1111
// aux-build:cci_class_cast.rs
12+
13+
#![allow(unknown_features)]
14+
#![feature(box_syntax)]
15+
1216
extern crate cci_class_cast;
1317

1418
use std::string::ToString;

src/test/run-pass/class-separate-impl.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
use std::fmt;
1215

1316
struct cat {

src/test/run-pass/cleanup-arm-conditional.rs

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
// Test that cleanup scope for temporaries created in a match
2222
// arm is confined to the match arm itself.
2323

24+
#![allow(unknown_features)]
25+
#![feature(box_syntax)]
26+
2427
use std::os;
2528

2629
struct Test { x: int }

src/test/run-pass/cleanup-rvalue-during-if-and-while.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// This test verifies that temporaries created for `while`'s and `if`
1313
// conditions are dropped after the condition is evaluated.
1414

15+
#![allow(unknown_features)]
16+
#![feature(box_syntax)]
1517

1618
struct Temporary;
1719

src/test/run-pass/cleanup-rvalue-temp-during-incomplete-alloc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
// It's unclear how likely such a bug is to recur, but it seems like a
2525
// scenario worth testing.
2626

27+
#![allow(unknown_features)]
28+
#![feature(box_syntax)]
29+
2730
use std::thread::Thread;
2831

2932
enum Conzabble {

src/test/run-pass/clone-with-exterior.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
use std::thread::Thread;
1215

1316
struct Pair {

src/test/run-pass/close-over-big-then-small-data.rs

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// storing closure data (as we used to do), the u64 would
1313
// overwrite the u16.
1414

15+
#![allow(unknown_features)]
16+
#![feature(box_syntax)]
17+
1518
struct Pair<A,B> {
1619
a: A, b: B
1720
}

src/test/run-pass/coerce-expect-unsized.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
use std::fmt::Show;
1215

1316
// Check that coercions apply at the pointer level and don't cause

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

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

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

13+
#![allow(unknown_features)]
1314
#![feature(box_syntax)]
1415

1516
pub fn main() {

src/test/run-pass/const-bound.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Make sure const bounds work on things, and test that a few types
1212
// are const.
1313

14+
#![allow(unknown_features)]
15+
#![feature(box_syntax)]
1416

1517
fn foo<T: Sync>(x: T) -> T { x }
1618

src/test/run-pass/crate-method-reexport-grrrrrrr.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
// This is a regression test that the metadata for the
1315
// name_pool::methods impl in the other crate is reachable from this

src/test/run-pass/deref-lval.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
use std::cell::Cell;
1315

src/test/run-pass/deref.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
pub fn main() {
1315
let x: Box<int> = box 10;

src/test/run-pass/deriving-default-box.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
use std::default::Default;
1215

1316
#[derive(Default)]

src/test/run-pass/deriving-encodable-decodable-box.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113
#![feature(old_orphan_check)]
1214

1315
extern crate serialize;

src/test/run-pass/deriving-eq-ord-boxed-slice.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
#[derive(PartialEq, PartialOrd, Eq, Ord)]
1215
struct Foo(Box<[u8]>);
1316

src/test/run-pass/drop-on-empty-block-exit.rs

+2
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+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
1113

1214
enum t { foo(Box<int>), }
1315

src/test/run-pass/drop-struct-as-object.rs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// Test that destructor on a struct runs successfully after the struct
1212
// is boxed and converted to an object.
1313

14+
#![allow(unknown_features)]
15+
#![feature(box_syntax)]
16+
1417
static mut value: uint = 0;
1518

1619
struct Cat {

src/test/run-pass/drop-trait-enum.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unknown_features)]
12+
#![feature(box_syntax)]
13+
1114
use std::thread::Thread;
1215
use std::sync::mpsc::{channel, Sender};
1316

0 commit comments

Comments
 (0)