Skip to content

Commit 3396365

Browse files
committed
Add appropriate #[feature] directives to tests
1 parent dd98f70 commit 3396365

File tree

108 files changed

+174
-44
lines changed

Some content is hidden

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

108 files changed

+174
-44
lines changed

src/etc/combine-tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def scrub(b):
4040
i = 0
4141
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
4242
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
43+
c.write("#[feature(globs, macro_rules, struct_variant)];\n")
4344
for t in stage2_tests:
4445
p = os.path.join(run_pass, t)
4546
p = p.replace("\\", "\\\\")
@@ -51,6 +52,7 @@ def scrub(b):
5152

5253
d = open("tmp/run_pass_stage2_driver.rs", "w")
5354
d.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
55+
d.write("#[feature(globs)];\n")
5456
d.write("extern mod extra;\n")
5557
d.write("extern mod run_pass_stage2;\n")
5658
d.write("use run_pass_stage2::*;\n")

src/etc/extract-tests.py

Lines changed: 1 addition & 0 deletions
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/librustc/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub fn phase_2_configure_and_expand(sess: Session,
159159
*sess.building_library = session::building_library(sess.opts.crate_type,
160160
&crate, sess.opts.test);
161161

162-
time(time_passes, ~"gated feature checking", (), |_|
162+
time(time_passes, "gated feature checking", (), |_|
163163
front::feature_gate::check_crate(sess, &crate));
164164

165165
// strip before expansion to allow macros to depend on

src/test/auxiliary/issue_2316_b.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
#[allow(unused_imports)];
12+
#[feature(globs)];
1213

1314
extern mod issue_2316_a;
1415

src/test/auxiliary/struct_variant_xc_aux.rs

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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;

0 commit comments

Comments
 (0)