From fd6e08a1e6bbccd00e70b23ac72dd9a9a633be30 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 31 May 2018 19:31:00 +0200 Subject: [PATCH] Remove some '#[feature]' attributes for stabilized features --- src/doc/unstable-book/src/library-features/alloc-system.md | 1 - src/liballoc_system/lib.rs | 1 - src/librustc_asan/lib.rs | 3 +-- src/librustc_lsan/lib.rs | 5 ++--- src/librustc_msan/lib.rs | 5 ++--- src/librustc_tsan/lib.rs | 3 +-- src/libstd/lib.rs | 1 - .../compile-fail/allocator/auxiliary/system-allocator.rs | 1 - .../compile-fail/allocator/auxiliary/system-allocator2.rs | 1 - src/test/compile-fail/allocator/function-allocator.rs | 1 - src/test/compile-fail/allocator/not-an-allocator.rs | 2 -- src/test/compile-fail/allocator/two-allocators.rs | 2 -- src/test/compile-fail/allocator/two-allocators2.rs | 2 -- src/test/compile-fail/allocator/two-allocators3.rs | 1 - src/test/run-make-fulldeps/std-core-cycle/foo.rs | 1 - src/test/run-pass-valgrind/issue-44800.rs | 5 +---- src/test/run-pass/allocator/auxiliary/custom-as-global.rs | 1 - src/test/run-pass/allocator/custom.rs | 2 +- src/test/run-pass/allocator/xcrate-use.rs | 2 +- src/test/run-pass/thin-lto-global-allocator.rs | 2 -- 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;