Skip to content

Commit df290f1

Browse files
committed
Require feature attributes, and add them where necessary
1 parent 7770ea7 commit df290f1

File tree

369 files changed

+702
-253
lines changed

Some content is hidden

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

369 files changed

+702
-253
lines changed

src/compiletest/compiletest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#![feature(std_misc)]
2121
#![feature(test)]
2222
#![feature(path_ext)]
23+
#![feature(str_char)]
2324

2425
#![deny(warnings)]
2526

src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#![feature(unsafe_no_drop_flag)]
3737
#![feature(step_by)]
3838
#![feature(str_char)]
39-
#![cfg_attr(test, feature(rand, rustc_private, test))]
39+
#![cfg_attr(test, feature(rand, rustc_private, test, hash, collections))]
4040
#![cfg_attr(test, allow(deprecated))] // rand
4141

4242
#![feature(no_std)]

src/libcollectionstest/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#![feature(unboxed_closures)]
2121
#![feature(unicode)]
2222
#![feature(unsafe_destructor)]
23+
#![cfg_attr(test, feature(str_char))]
2324

2425
#[macro_use] extern crate log;
2526

src/libcoretest/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#![feature(io)]
2525
#![feature(collections)]
2626
#![feature(debug_builders)]
27+
#![feature(unique)]
28+
#![feature(step_by)]
2729
#![allow(deprecated)] // rand
2830

2931
extern crate core;

src/libflate/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#![feature(libc)]
2929
#![feature(staged_api)]
3030
#![feature(unique)]
31+
#![cfg_attr(test, feature(rustc_private, rand, collections))]
3132

3233
#[cfg(test)] #[macro_use] extern crate log;
3334

src/librand/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#![deprecated(reason = "use the crates.io `rand` library instead",
3535
since = "1.0.0-alpha")]
3636

37-
#![cfg_attr(test, feature(test, rand))]
37+
#![cfg_attr(test, feature(test, rand, rustc_private))]
3838

3939
#![allow(deprecated)]
4040

src/librustc/lint/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl LintStore {
212212
fn maybe_stage_features(&mut self, sess: &Session) {
213213
let lvl = match sess.opts.unstable_features {
214214
UnstableFeatures::Default => return,
215-
UnstableFeatures::Disallow => Warn,
215+
UnstableFeatures::Disallow => Forbid,
216216
UnstableFeatures::Cheat => Allow
217217
};
218218
match self.by_name.get("unstable_features") {

src/librustc/middle/stability.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use syntax::ast::{Item, Generics, StructField};
2626
use syntax::ast_util::is_local;
2727
use syntax::attr::{Stability, AttrMetaMethods};
2828
use syntax::visit::{FnKind, Visitor};
29-
use syntax::feature_gate::emit_feature_warn;
29+
use syntax::feature_gate::emit_feature_err;
3030
use util::nodemap::{NodeMap, DefIdMap, FnvHashSet, FnvHashMap};
3131
use util::ppaux::Repr;
3232

@@ -237,7 +237,7 @@ impl<'a, 'tcx> Checker<'a, 'tcx> {
237237
None => format!("use of unstable library feature '{}'", &feature)
238238
};
239239

240-
emit_feature_warn(&self.tcx.sess.parse_sess.span_diagnostic,
240+
emit_feature_err(&self.tcx.sess.parse_sess.span_diagnostic,
241241
&feature, span, &msg);
242242
}
243243
}

src/librustc_back/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#![feature(std_misc)]
5050
#![feature(path_relative_from)]
5151
#![feature(step_by)]
52+
#![cfg_attr(test, feature(test, rand))]
5253

5354
extern crate syntax;
5455
extern crate serialize;

src/librustc_bitflags/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#![feature(no_std)]
1919
#![no_std]
2020
#![unstable(feature = "rustc_private")]
21+
#![cfg_attr(test, feature(hash))]
2122

2223
//! A typesafe bitmask flag generator.
2324

0 commit comments

Comments
 (0)