about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-05-31 19:31:00 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-06-11 13:48:57 -0700
commitfd6e08a1e6bbccd00e70b23ac72dd9a9a633be30 (patch)
treea35a62fa85928632c6434aea8ee8f701ccfd6cec /src
parent999690ce5d43721d1b1c7fdeb9b58748976b10b5 (diff)
downloadrust-fd6e08a1e6bbccd00e70b23ac72dd9a9a633be30.tar.gz
rust-fd6e08a1e6bbccd00e70b23ac72dd9a9a633be30.zip
Remove some '#[feature]' attributes for stabilized features
Diffstat (limited to 'src')
-rw-r--r--src/doc/unstable-book/src/library-features/alloc-system.md1
-rw-r--r--src/liballoc_system/lib.rs1
-rw-r--r--src/librustc_asan/lib.rs3
-rw-r--r--src/librustc_lsan/lib.rs5
-rw-r--r--src/librustc_msan/lib.rs5
-rw-r--r--src/librustc_tsan/lib.rs3
-rw-r--r--src/libstd/lib.rs1
-rw-r--r--src/test/compile-fail/allocator/auxiliary/system-allocator.rs1
-rw-r--r--src/test/compile-fail/allocator/auxiliary/system-allocator2.rs1
-rw-r--r--src/test/compile-fail/allocator/function-allocator.rs1
-rw-r--r--src/test/compile-fail/allocator/not-an-allocator.rs2
-rw-r--r--src/test/compile-fail/allocator/two-allocators.rs2
-rw-r--r--src/test/compile-fail/allocator/two-allocators2.rs2
-rw-r--r--src/test/compile-fail/allocator/two-allocators3.rs1
-rw-r--r--src/test/run-make-fulldeps/std-core-cycle/foo.rs1
-rw-r--r--src/test/run-pass-valgrind/issue-44800.rs5
-rw-r--r--src/test/run-pass/allocator/auxiliary/custom-as-global.rs1
-rw-r--r--src/test/run-pass/allocator/custom.rs2
-rw-r--r--src/test/run-pass/allocator/xcrate-use.rs2
-rw-r--r--src/test/run-pass/thin-lto-global-allocator.rs2
20 files changed, 9 insertions, 33 deletions
diff --git a/src/doc/unstable-book/src/library-features/alloc-system.md b/src/doc/unstable-book/src/library-features/alloc-system.md
index 9effab202ca..5663b354ac1 100644
--- a/src/doc/unstable-book/src/library-features/alloc-system.md
+++ b/src/doc/unstable-book/src/library-features/alloc-system.md
@@ -61,7 +61,6 @@ crate.io’s `jemallocator` crate provides equivalent functionality.)
 jemallocator = "0.1"
 ```
 ```rust,ignore
-#![feature(global_allocator)]
 #![crate_type = "dylib"]
 
 extern crate jemallocator;
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs
index a592868cbef..2b748c4702d 100644
--- a/src/liballoc_system/lib.rs
+++ b/src/liballoc_system/lib.rs
@@ -14,7 +14,6 @@
             reason = "this library is unlikely to be stabilized in its current \
                       form or name",
             issue = "32838")]
-#![feature(global_allocator)]
 #![feature(allocator_api)]
 #![feature(core_intrinsics)]
 #![feature(staged_api)]
diff --git a/src/librustc_asan/lib.rs b/src/librustc_asan/lib.rs
index 3429e3bda0f..a7aeed76309 100644
--- a/src/librustc_asan/lib.rs
+++ b/src/librustc_asan/lib.rs
@@ -10,8 +10,7 @@
 
 #![sanitizer_runtime]
 #![feature(alloc_system)]
-#![feature(allocator_api)]
-#![feature(global_allocator)]
+#![cfg_attr(stage0, feature(global_allocator))]
 #![feature(sanitizer_runtime)]
 #![feature(staged_api)]
 #![no_std]
diff --git a/src/librustc_lsan/lib.rs b/src/librustc_lsan/lib.rs
index 81a09e7e21a..a7aeed76309 100644
--- a/src/librustc_lsan/lib.rs
+++ b/src/librustc_lsan/lib.rs
@@ -9,10 +9,9 @@
 // except according to those terms.
 
 #![sanitizer_runtime]
-#![feature(sanitizer_runtime)]
 #![feature(alloc_system)]
-#![feature(allocator_api)]
-#![feature(global_allocator)]
+#![cfg_attr(stage0, feature(global_allocator))]
+#![feature(sanitizer_runtime)]
 #![feature(staged_api)]
 #![no_std]
 #![unstable(feature = "sanitizer_runtime_lib",
diff --git a/src/librustc_msan/lib.rs b/src/librustc_msan/lib.rs
index 81a09e7e21a..a7aeed76309 100644
--- a/src/librustc_msan/lib.rs
+++ b/src/librustc_msan/lib.rs
@@ -9,10 +9,9 @@
 // except according to those terms.
 
 #![sanitizer_runtime]
-#![feature(sanitizer_runtime)]
 #![feature(alloc_system)]
-#![feature(allocator_api)]
-#![feature(global_allocator)]
+#![cfg_attr(stage0, feature(global_allocator))]
+#![feature(sanitizer_runtime)]
 #![feature(staged_api)]
 #![no_std]
 #![unstable(feature = "sanitizer_runtime_lib",
diff --git a/src/librustc_tsan/lib.rs b/src/librustc_tsan/lib.rs
index 3429e3bda0f..a7aeed76309 100644
--- a/src/librustc_tsan/lib.rs
+++ b/src/librustc_tsan/lib.rs
@@ -10,8 +10,7 @@
 
 #![sanitizer_runtime]
 #![feature(alloc_system)]
-#![feature(allocator_api)]
-#![feature(global_allocator)]
+#![cfg_attr(stage0, feature(global_allocator))]
 #![feature(sanitizer_runtime)]
 #![feature(staged_api)]
 #![no_std]
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 3972763a051..fa3d39cb1d8 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -263,7 +263,6 @@
 #![feature(fnbox)]
 #![feature(futures_api)]
 #![feature(hashmap_internals)]
-#![feature(heap_api)]
 #![feature(int_error_internals)]
 #![feature(integer_atomics)]
 #![feature(into_cow)]
diff --git a/src/test/compile-fail/allocator/auxiliary/system-allocator.rs b/src/test/compile-fail/allocator/auxiliary/system-allocator.rs
index 37e64ba7ea1..e5650d5b7b0 100644
--- a/src/test/compile-fail/allocator/auxiliary/system-allocator.rs
+++ b/src/test/compile-fail/allocator/auxiliary/system-allocator.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(global_allocator, allocator_api)]
 #![crate_type = "rlib"]
 
 use std::alloc::System;
diff --git a/src/test/compile-fail/allocator/auxiliary/system-allocator2.rs b/src/test/compile-fail/allocator/auxiliary/system-allocator2.rs
index 37e64ba7ea1..e5650d5b7b0 100644
--- a/src/test/compile-fail/allocator/auxiliary/system-allocator2.rs
+++ b/src/test/compile-fail/allocator/auxiliary/system-allocator2.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(global_allocator, allocator_api)]
 #![crate_type = "rlib"]
 
 use std::alloc::System;
diff --git a/src/test/compile-fail/allocator/function-allocator.rs b/src/test/compile-fail/allocator/function-allocator.rs
index 50f82607b53..989c102b86e 100644
--- a/src/test/compile-fail/allocator/function-allocator.rs
+++ b/src/test/compile-fail/allocator/function-allocator.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(global_allocator)]
 
 #[global_allocator]
 fn foo() {} //~ ERROR: allocators must be statics
diff --git a/src/test/compile-fail/allocator/not-an-allocator.rs b/src/test/compile-fail/allocator/not-an-allocator.rs
index 140cad22f34..6559335960a 100644
--- a/src/test/compile-fail/allocator/not-an-allocator.rs
+++ b/src/test/compile-fail/allocator/not-an-allocator.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(global_allocator, heap_api)]
-
 #[global_allocator]
 static A: usize = 0;
 //~^ the trait bound `usize:
diff --git a/src/test/compile-fail/allocator/two-allocators.rs b/src/test/compile-fail/allocator/two-allocators.rs
index 5aa6b5d6777..7a97a11df20 100644
--- a/src/test/compile-fail/allocator/two-allocators.rs
+++ b/src/test/compile-fail/allocator/two-allocators.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(global_allocator, allocator_api)]
-
 use std::alloc::System;
 
 #[global_allocator]
diff --git a/src/test/compile-fail/allocator/two-allocators2.rs b/src/test/compile-fail/allocator/two-allocators2.rs
index ec5d985a943..e747140dfe5 100644
--- a/src/test/compile-fail/allocator/two-allocators2.rs
+++ b/src/test/compile-fail/allocator/two-allocators2.rs
@@ -12,8 +12,6 @@
 // no-prefer-dynamic
 // error-pattern: the #[global_allocator] in
 
-#![feature(global_allocator, allocator_api)]
-
 extern crate system_allocator;
 
 use std::alloc::System;
diff --git a/src/test/compile-fail/allocator/two-allocators3.rs b/src/test/compile-fail/allocator/two-allocators3.rs
index c310d94f6df..dd86b02bd20 100644
--- a/src/test/compile-fail/allocator/two-allocators3.rs
+++ b/src/test/compile-fail/allocator/two-allocators3.rs
@@ -13,7 +13,6 @@
 // no-prefer-dynamic
 // error-pattern: the #[global_allocator] in
 
-#![feature(global_allocator)]
 
 extern crate system_allocator;
 extern crate system_allocator2;
diff --git a/src/test/run-make-fulldeps/std-core-cycle/foo.rs b/src/test/run-make-fulldeps/std-core-cycle/foo.rs
index 04742bba3c8..46047fb835d 100644
--- a/src/test/run-make-fulldeps/std-core-cycle/foo.rs
+++ b/src/test/run-make-fulldeps/std-core-cycle/foo.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(global_allocator)]
 #![crate_type = "cdylib"]
 
 extern crate bar;
diff --git a/src/test/run-pass-valgrind/issue-44800.rs b/src/test/run-pass-valgrind/issue-44800.rs
index cfde6f32f66..29cfae16929 100644
--- a/src/test/run-pass-valgrind/issue-44800.rs
+++ b/src/test/run-pass-valgrind/issue-44800.rs
@@ -8,11 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(global_allocator, alloc_system, allocator_api)]
-extern crate alloc_system;
-
+use std::alloc::System;
 use std::collections::VecDeque;
-use alloc_system::System;
 
 #[global_allocator]
 static ALLOCATOR: System = System;
diff --git a/src/test/run-pass/allocator/auxiliary/custom-as-global.rs b/src/test/run-pass/allocator/auxiliary/custom-as-global.rs
index 538f36faadf..a3f05a01c5a 100644
--- a/src/test/run-pass/allocator/auxiliary/custom-as-global.rs
+++ b/src/test/run-pass/allocator/auxiliary/custom-as-global.rs
@@ -10,7 +10,6 @@
 
 // no-prefer-dynamic
 
-#![feature(global_allocator)]
 #![crate_type = "rlib"]
 
 extern crate custom;
diff --git a/src/test/run-pass/allocator/custom.rs b/src/test/run-pass/allocator/custom.rs
index 5da13bd4cb9..3a7f8fa8620 100644
--- a/src/test/run-pass/allocator/custom.rs
+++ b/src/test/run-pass/allocator/custom.rs
@@ -11,7 +11,7 @@
 // aux-build:helper.rs
 // no-prefer-dynamic
 
-#![feature(global_allocator, heap_api, allocator_api)]
+#![feature(allocator_api)]
 
 extern crate helper;
 
diff --git a/src/test/run-pass/allocator/xcrate-use.rs b/src/test/run-pass/allocator/xcrate-use.rs
index 78d604a7108..482e3b04aae 100644
--- a/src/test/run-pass/allocator/xcrate-use.rs
+++ b/src/test/run-pass/allocator/xcrate-use.rs
@@ -12,7 +12,7 @@
 // aux-build:helper.rs
 // no-prefer-dynamic
 
-#![feature(global_allocator, heap_api, allocator_api)]
+#![feature(allocator_api)]
 
 extern crate custom;
 extern crate helper;
diff --git a/src/test/run-pass/thin-lto-global-allocator.rs b/src/test/run-pass/thin-lto-global-allocator.rs
index a0534ff6735..3a0e2fe01db 100644
--- a/src/test/run-pass/thin-lto-global-allocator.rs
+++ b/src/test/run-pass/thin-lto-global-allocator.rs
@@ -11,8 +11,6 @@
 // compile-flags: -Z thinlto -C codegen-units=2
 // min-llvm-version 4.0
 
-#![feature(allocator_api, global_allocator)]
-
 #[global_allocator]
 static A: std::alloc::System = std::alloc::System;