Skip to content

Commit 353f77b

Browse files
committed
Add appropriate #[feature] directives to tests
1 parent 1c35643 commit 353f77b

File tree

92 files changed

+151
-43
lines changed

Some content is hidden

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

92 files changed

+151
-43
lines changed

src/etc/extract-tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
#[ allow(unused_variable) ];\n
6464
#[ allow(dead_assignment) ];\n
6565
#[ allow(unused_mut) ];\n
66+
#[ feature(macro_rules, globs, struct_variant) ];\n
6667
""" + block
6768
if xfail:
6869
block = "// xfail-test\n" + block

src/test/auxiliary/issue_2316_b.rs

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

1111
#[allow(unused_imports)];
12+
#[feature(globs)];
1213

1314
extern mod issue_2316_a;
1415

src/test/auxiliary/struct_variant_xc_aux.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
vers = "0.1")];
1313
#[crate_type = "lib"];
1414

15+
#[feature(struct_variant)];
16+
1517
pub enum Enum {
1618
Variant { arg: u8 }
1719
}

src/test/bench/core-std.rs

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

1111
// Microbenchmarks for various functions in std and extra
1212

13+
#[feature(macro_rules)];
14+
1315
extern mod extra;
1416

1517
use extra::time::precise_time_s;

src/test/bench/rt-parfib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::os;
1414
use std::uint;
1515
use std::rt::test::spawntask_later;
1616
use std::cell::Cell;
17-
use std::comm::*;
17+
use std::comm::oneshot;
1818

1919
// A simple implementation of parfib. One subtree is found in a new
2020
// task and communicated over a oneshot pipe, the other is found

src/test/bench/shootout-chameneos-redux.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
extern mod extra;
1414

1515
use std::cell::Cell;
16-
use std::comm::*;
16+
use std::comm::{stream, SharedChan};
1717
use std::io;
1818
use std::option;
1919
use std::os;

src/test/bench/shootout-pfib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
extern mod extra;
2323

2424
use extra::{time, getopts};
25-
use std::comm::*;
25+
use std::comm::{stream, SharedChan};
2626
use std::io::WriterUtil;
2727
use std::io;
2828
use std::os;

src/test/bench/task-perf-linked-failure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// Creates in the background 'num_tasks' tasks, all blocked forever.
2323
// Doesn't return until all such tasks are ready, but doesn't block forever itself.
2424

25-
use std::comm::*;
25+
use std::comm::{stream, SharedChan};
2626
use std::os;
2727
use std::result;
2828
use std::task;

src/test/compile-fail/dup-struct-enum-struct-variant.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+
#[feature(struct_variant)];
12+
1113
enum Foo { C { a: int, b: int } }
1214
struct C { a: int, b: int } //~ ERROR error: duplicate definition of type `C`
1315

src/test/compile-fail/functional-struct-update-noncopyable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// xfail-fast #7103
1414
extern mod extra;
15-
use extra::arc::*;
15+
use extra::arc::Arc;
1616

1717
struct A { y: Arc<int>, x: Arc<int> }
1818

src/test/compile-fail/import-glob-0.rs

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

1111
// error-pattern: unresolved name
1212

13+
#[feature(globs)];
14+
1315
use module_of_many_things::*;
1416

1517
mod module_of_many_things {

src/test/compile-fail/import-glob-circular.rs

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

1111
// error-pattern: unresolved
1212

13+
#[feature(globs)];
14+
1315
mod circ1 {
1416
pub use circ2::f2;
1517
pub fn f1() { info2!("f1"); }

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

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

1111
// Testing that we don't fail abnormally after hitting the errors
1212

13+
#[feature(globs)];
14+
1315
use unresolved::*; //~ ERROR unresolved import. maybe a missing
1416
//~^ ERROR failed to resolve import
1517

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

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// ensures that 'use foo:*' doesn't import non-public 'use' statements in the
1414
// module 'foo'
1515

16+
#[feature(globs)];
17+
1618
use m1::*;
1719

1820
mod foo {

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

+1
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(macro_rules)];
1112

1213
use std::io;
1314

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
macro_rules! e( //~ ERROR unknown macro variable `nonexistent`
1+
#[feature(macro_rules)];
2+
3+
// error-pattern: unknown macro variable `nonexistent`
4+
5+
macro_rules! e(
26
($inp:ident) => (
37
$nonexistent
48
);

src/test/compile-fail/lint-stability.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// xfail-fast aux-build
1212
// aux-build:lint_stability.rs
1313

14+
#[feature(globs)];
1415
#[deny(unstable)];
1516
#[deny(deprecated)];
1617
#[deny(experimental)];

src/test/compile-fail/lint-unused-import-tricky-globs.rs

+1
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(globs)];
1112
#[deny(unused_imports)];
1213

1314
mod A {

src/test/compile-fail/lint-unused-imports.rs

+1
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(globs)];
1112
#[deny(unused_imports)];
1213

1314
use cal = bar::c::cc;

src/test/compile-fail/macro-incomplete-parse.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+
#[feature(macro_rules)];
12+
1113
macro_rules! ignored_item {
1214
() => {
1315
fn foo() {}

src/test/compile-fail/macro-inner-attributes.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#[feature(macro_rules)];
2+
13
macro_rules! test ( ($nm:ident,
24
$a:attr,
35
$i:item) => (mod $nm { $a; $i }); )

src/test/compile-fail/macro-outer-attributes.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#[feature(macro_rules)];
2+
13
macro_rules! test ( ($nm:ident,
24
$a:attr,
35
$i:item) => (mod $nm { $a $i }); )

src/test/compile-fail/name-clash-nullary.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+
#[feature(globs)];
12+
1113
// error-pattern:declaration of `None` shadows
1214
use std::option::*;
1315

src/test/compile-fail/private-method-cross-crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-fast
1212
// aux-build:cci_class_5.rs
1313
extern mod cci_class_5;
14-
use cci_class_5::kitties::*;
14+
use cci_class_5::kitties::cat;
1515

1616
fn main() {
1717
let nyan : cat = cat(52, 99);

src/test/compile-fail/private-struct-field-cross-crate.rs

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

1111
// aux-build:cci_class.rs
1212
extern mod cci_class;
13-
use cci_class::kitties::*;
13+
use cci_class::kitties::cat;
1414

1515
fn main() {
1616
let nyan : cat = cat(52u, 99);

src/test/compile-fail/struct-like-enum-nonexhaustive.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+
#[feature(struct_variant)];
12+
1113
enum A {
1214
B { x: Option<int> },
1315
C

src/test/run-pass/anon-extern-mod-cross-crate-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// aux-build:anon-extern-mod-cross-crate-1.rs
1313
extern mod anonexternmod;
1414

15-
use anonexternmod::*;
15+
use anonexternmod::rust_get_test_int;
1616

1717
#[fixed_stack_segment]
1818
pub fn main() {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// except according to those terms.
1212

1313
extern mod extra;
14-
use extra::bitv::*;
14+
use extra::bitv::Bitv;
1515

1616
fn bitv_test() {
1717
let mut v1 = ~Bitv::new(31, false);

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

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Check that we do not ICE when compiling this
22
// macro, which reuses the expression `$id`
33

4+
#[feature(macro_rules)];
5+
46
struct Foo {
57
a: int
68
}

src/test/run-pass/cci_nested_exe.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// xfail-fast - check-fast doesn't understand aux-build
1212
// aux-build:cci_nested_lib.rs
1313

14+
#[feature(globs)];
15+
1416
extern mod cci_nested_lib;
1517
use cci_nested_lib::*;
1618

src/test/run-pass/cfg-macros-foo.rs

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// check that cfg correctly chooses between the macro impls (see also
1515
// cfg-macros-notfoo.rs)
1616

17+
#[feature(macro_rules)];
18+
1719
#[cfg(foo)]
1820
#[macro_escape]
1921
mod foo {

src/test/run-pass/cfg-macros-notfoo.rs

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// check that cfg correctly chooses between the macro impls (see also
1515
// cfg-macros-foo.rs)
1616

17+
#[feature(macro_rules)];
18+
1719
#[cfg(foo)]
1820
#[macro_escape]
1921
mod foo {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// aux-build:cci_class_cast.rs
1313
extern mod cci_class_cast;
1414
use std::to_str::ToStr;
15-
use cci_class_cast::kitty::*;
15+
use cci_class_cast::kitty::cat;
1616

1717
fn print_out(thing: @ToStr, expected: ~str) {
1818
let actual = thing.to_str();

src/test/run-pass/class-exports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/* Test that exporting a class also exports its
1414
public fields and methods */
1515

16-
use kitty::*;
16+
use kitty::cat;
1717

1818
mod kitty {
1919
pub struct cat {

src/test/run-pass/class-implement-trait-cross-crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-fast
1212
// aux-build:cci_class_trait.rs
1313
extern mod cci_class_trait;
14-
use cci_class_trait::animals::*;
14+
use cci_class_trait::animals::noisy;
1515

1616
struct cat {
1717
priv meows: uint,

src/test/run-pass/class-method-cross-crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-fast
1212
// aux-build:cci_class_2.rs
1313
extern mod cci_class_2;
14-
use cci_class_2::kitties::*;
14+
use cci_class_2::kitties::cat;
1515

1616
pub fn main() {
1717
let nyan : cat = cat(52u, 99);

src/test/run-pass/class-methods-cross-crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-fast
1212
// aux-build:cci_class_3.rs
1313
extern mod cci_class_3;
14-
use cci_class_3::kitties::*;
14+
use cci_class_3::kitties::cat;
1515

1616
pub fn main() {
1717
let mut nyan : cat = cat(52u, 99);

src/test/run-pass/class-poly-methods-cross-crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-fast
1212
// aux-build:cci_class_6.rs
1313
extern mod cci_class_6;
14-
use cci_class_6::kitties::*;
14+
use cci_class_6::kitties::cat;
1515

1616
pub fn main() {
1717
let mut nyan : cat<char> = cat::<char>(52u, 99, ~['p']);

src/test/run-pass/classes-cross-crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-fast
1212
// aux-build:cci_class_4.rs
1313
extern mod cci_class_4;
14-
use cci_class_4::kitties::*;
14+
use cci_class_4::kitties::cat;
1515

1616
pub fn main() {
1717
let mut nyan = cat(0u, 2, ~"nyan");

src/test/run-pass/classes-simple-cross-crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// xfail-fast
1212
// aux-build:cci_class.rs
1313
extern mod cci_class;
14-
use cci_class::kitties::*;
14+
use cci_class::kitties::cat;
1515

1616
pub fn main() {
1717
let nyan : cat = cat(52u, 99);

src/test/run-pass/const-enum-structlike.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+
#[feature(struct_variant)];
12+
1113
enum E {
1214
S0 { s: ~str },
1315
S1 { u: uint }

src/test/run-pass/core-run-destroy.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// instead of in std.
1717

1818
use std::libc;
19-
use std::run::*;
2019
use std::run;
2120
use std::str;
2221

src/test/run-pass/deriving-cmp-generic-struct-enum.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+
#[feature(struct_variant)];
12+
1113
#[deriving(Eq, TotalEq, Ord, TotalOrd)]
1214
enum ES<T> {
1315
ES1 { x: T },

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313

1414
// xfail-fast
1515

16+
#[feature(struct_variant)];
17+
1618
extern mod extra;
1719

1820
use std::io;
1921
use std::rand::{random, Rand};
20-
use extra::serialize::*;
22+
use extra::serialize::{Encodable, Decodable};
2123
use extra::ebml;
2224
use extra::ebml::writer::Encoder;
2325
use extra::ebml::reader::Decoder;

src/test/run-pass/deriving-rand.rs

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

12+
#[feature(struct_variant)];
13+
1214
use std::rand;
1315

1416
#[deriving(Rand)]

0 commit comments

Comments
 (0)