about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-11-24 01:52:55 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-11-25 21:55:26 +0300
commitbe8ace8cacddcb59d7fb982dd0e0eab81290ea0b (patch)
tree8d813932e21765c074f5fc85fb65208ac74362f4
parent5127d24a3e863a0ce99bffd6bacfce396ae0813b (diff)
downloadrust-be8ace8cacddcb59d7fb982dd0e0eab81290ea0b.tar.gz
rust-be8ace8cacddcb59d7fb982dd0e0eab81290ea0b.zip
Remove all uses of `#[staged_api]`
-rw-r--r--src/liballoc/lib.rs2
-rw-r--r--src/liballoc_jemalloc/lib.rs2
-rw-r--r--src/liballoc_system/lib.rs2
-rw-r--r--src/libarena/lib.rs2
-rw-r--r--src/libcollections/lib.rs2
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/libflate/lib.rs2
-rw-r--r--src/libfmt_macros/lib.rs2
-rw-r--r--src/libgetopts/lib.rs2
-rw-r--r--src/libgraphviz/lib.rs2
-rw-r--r--src/liblog/lib.rs2
-rw-r--r--src/librand/lib.rs2
-rw-r--r--src/librbml/lib.rs2
-rw-r--r--src/librustc/lib.rs2
-rw-r--r--src/librustc_back/lib.rs2
-rw-r--r--src/librustc_bitflags/lib.rs2
-rw-r--r--src/librustc_borrowck/lib.rs2
-rw-r--r--src/librustc_data_structures/lib.rs2
-rw-r--r--src/librustc_driver/lib.rs2
-rw-r--r--src/librustc_front/lib.rs2
-rw-r--r--src/librustc_lint/lib.rs2
-rw-r--r--src/librustc_llvm/lib.rs2
-rw-r--r--src/librustc_platform_intrinsics/lib.rs2
-rw-r--r--src/librustc_privacy/lib.rs2
-rw-r--r--src/librustc_resolve/lib.rs2
-rw-r--r--src/librustc_trans/lib.rs2
-rw-r--r--src/librustc_typeck/lib.rs2
-rw-r--r--src/librustc_unicode/lib.rs2
-rw-r--r--src/librustdoc/lib.rs2
-rw-r--r--src/libserialize/lib.rs2
-rw-r--r--src/libstd/lib.rs2
-rw-r--r--src/libsyntax/lib.rs2
-rw-r--r--src/libterm/lib.rs2
-rw-r--r--src/libtest/lib.rs2
-rw-r--r--src/test/auxiliary/inherited_stability.rs1
-rw-r--r--src/test/auxiliary/internal_unstable.rs1
-rw-r--r--src/test/auxiliary/lint_output_format.rs1
-rw-r--r--src/test/auxiliary/lint_stability.rs1
-rw-r--r--src/test/auxiliary/lint_stability_fields.rs1
-rw-r--r--src/test/auxiliary/stability_attribute_issue.rs1
-rw-r--r--src/test/auxiliary/stability_cfg1.rs1
-rw-r--r--src/test/auxiliary/stability_cfg2.rs1
-rw-r--r--src/test/compile-fail/issue-17337.rs1
-rw-r--r--src/test/compile-fail/lint-forbid-cmdline.rs1
-rw-r--r--src/test/compile-fail/lint-stability-fields.rs1
-rw-r--r--src/test/compile-fail/lint-stability.rs1
-rw-r--r--src/test/compile-fail/missing-stability.rs1
-rw-r--r--src/test/compile-fail/stability-attribute-sanity-2.rs1
-rw-r--r--src/test/compile-fail/stability-attribute-sanity.rs1
-rw-r--r--src/test/run-make/allow-warnings-cmdline-stability/bar.rs1
-rw-r--r--src/test/rustdoc/issue-18199.rs1
-rw-r--r--src/test/rustdoc/issue-27759.rs1
52 files changed, 34 insertions, 52 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 3e87b7ebea8..5d31385462c 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -60,7 +60,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "alloc"]
 #![crate_type = "rlib"]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![allow(unused_attributes)]
 #![unstable(feature = "alloc",
             reason = "this library is unlikely to be stabilized in its current \
diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs
index f2ff0593bfa..49127d53b48 100644
--- a/src/liballoc_jemalloc/lib.rs
+++ b/src/liballoc_jemalloc/lib.rs
@@ -11,7 +11,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "alloc_jemalloc"]
 #![crate_type = "rlib"]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![no_std]
 #![cfg_attr(not(stage0), allocator)]
 #![cfg_attr(stage0, allow(improper_ctypes))]
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs
index 93b64c9caeb..df1759b2be0 100644
--- a/src/liballoc_system/lib.rs
+++ b/src/liballoc_system/lib.rs
@@ -11,7 +11,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "alloc_system"]
 #![crate_type = "rlib"]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![no_std]
 #![cfg_attr(not(stage0), allocator)]
 #![cfg_attr(stage0, allow(improper_ctypes))]
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs
index 2234d3608f3..2f73adc3b28 100644
--- a/src/libarena/lib.rs
+++ b/src/libarena/lib.rs
@@ -23,7 +23,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "arena"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs
index b9b560df0b6..91c5fd4cb93 100644
--- a/src/libcollections/lib.rs
+++ b/src/libcollections/lib.rs
@@ -16,7 +16,7 @@
 // Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "collections"]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![unstable(feature = "collections",
             reason = "library is unlikely to be stabilized with the current \
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 3ebf9d6be63..f8bda4b6b2b 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -56,7 +56,7 @@
             reason = "the libcore library has not yet been scrutinized for \
                       stabilization in terms of structure and naming",
             issue = "27701")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs
index 513379b6558..ba3f16d8450 100644
--- a/src/libflate/lib.rs
+++ b/src/libflate/lib.rs
@@ -18,7 +18,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "flate"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs
index dc69f38e4e7..faf307cc44c 100644
--- a/src/libfmt_macros/lib.rs
+++ b/src/libfmt_macros/lib.rs
@@ -18,7 +18,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "fmt_macros"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs
index f49451f827d..a8483798aca 100644
--- a/src/libgetopts/lib.rs
+++ b/src/libgetopts/lib.rs
@@ -84,7 +84,7 @@
 #![unstable(feature = "rustc_private",
             reason = "use the crates.io `getopts` library instead",
             issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs
index 1fb54ed9071..b57a0707acc 100644
--- a/src/libgraphviz/lib.rs
+++ b/src/libgraphviz/lib.rs
@@ -276,7 +276,7 @@
 #![crate_name = "graphviz"]
 #![unstable(feature = "rustc_private", issue = "27812")]
 #![feature(staged_api)]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index 1de7ebfffde..f9adef1f4af 100644
--- a/src/liblog/lib.rs
+++ b/src/liblog/lib.rs
@@ -162,7 +162,7 @@
 #![unstable(feature = "rustc_private",
             reason = "use the crates.io `log` library instead",
             issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librand/lib.rs b/src/librand/lib.rs
index cf2118b45a4..3c1668b6c11 100644
--- a/src/librand/lib.rs
+++ b/src/librand/lib.rs
@@ -26,7 +26,7 @@
        html_playground_url = "https://play.rust-lang.org/",
        test(attr(deny(warnings))))]
 #![no_std]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![unstable(feature = "rand",
             reason = "use `rand` from crates.io",
             issue = "27703")]
diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs
index a1b15cd9e6f..d51280a187c 100644
--- a/src/librbml/lib.rs
+++ b/src/librbml/lib.rs
@@ -115,7 +115,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rbml"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs
index 393329b4214..a81ecd38638 100644
--- a/src/librustc/lib.rs
+++ b/src/librustc/lib.rs
@@ -18,7 +18,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs
index 14fb064b7aa..593e1c2a726 100644
--- a/src/librustc_back/lib.rs
+++ b/src/librustc_back/lib.rs
@@ -25,7 +25,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_back"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_bitflags/lib.rs b/src/librustc_bitflags/lib.rs
index 16f586cf5e0..3ea5cfcaff0 100644
--- a/src/librustc_bitflags/lib.rs
+++ b/src/librustc_bitflags/lib.rs
@@ -14,7 +14,7 @@
 #![crate_name = "rustc_bitflags"]
 #![feature(associated_consts)]
 #![feature(staged_api)]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![feature(no_std)]
 #![no_std]
diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs
index d7e1bab46da..93cea9479a5 100644
--- a/src/librustc_borrowck/lib.rs
+++ b/src/librustc_borrowck/lib.rs
@@ -12,7 +12,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_borrowck"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index 4688742a4ab..39b3842791f 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -22,7 +22,7 @@
 #![unstable(feature = "rustc_private", issue = "27812")]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://www.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 6cbba235ff7..649834d4e95 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -18,7 +18,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_driver"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_front/lib.rs b/src/librustc_front/lib.rs
index bafda3086fd..09ff7c8e58e 100644
--- a/src/librustc_front/lib.rs
+++ b/src/librustc_front/lib.rs
@@ -18,7 +18,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_front"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs
index 2613115d805..06e54141d7a 100644
--- a/src/librustc_lint/lib.rs
+++ b/src/librustc_lint/lib.rs
@@ -23,7 +23,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_lint"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs
index 0cb0869db86..26187ade464 100644
--- a/src/librustc_llvm/lib.rs
+++ b/src/librustc_llvm/lib.rs
@@ -20,7 +20,7 @@
 
 #![crate_name = "rustc_llvm"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_platform_intrinsics/lib.rs b/src/librustc_platform_intrinsics/lib.rs
index 9aee15b05df..3de6863652a 100644
--- a/src/librustc_platform_intrinsics/lib.rs
+++ b/src/librustc_platform_intrinsics/lib.rs
@@ -11,7 +11,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_platform_intrinsics"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![feature(staged_api, rustc_private)]
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs
index fdd5add68f2..9f70598198e 100644
--- a/src/librustc_privacy/lib.rs
+++ b/src/librustc_privacy/lib.rs
@@ -12,7 +12,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_privacy"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index 51d7ceb946d..0e5384d19f5 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -12,7 +12,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_resolve"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs
index 6b465cf28f3..58949a63ebe 100644
--- a/src/librustc_trans/lib.rs
+++ b/src/librustc_trans/lib.rs
@@ -18,7 +18,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_trans"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs
index 1a52df31f39..1b59aaa4c32 100644
--- a/src/librustc_typeck/lib.rs
+++ b/src/librustc_typeck/lib.rs
@@ -66,7 +66,7 @@ This API is completely unstable and subject to change.
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_typeck"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_unicode/lib.rs b/src/librustc_unicode/lib.rs
index af92e96fcdf..f51770fd653 100644
--- a/src/librustc_unicode/lib.rs
+++ b/src/librustc_unicode/lib.rs
@@ -24,7 +24,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_unicode"]
 #![unstable(feature = "unicode", issue = "27783")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index db0da3764ba..9afe573936d 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -12,7 +12,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustdoc"]
 #![unstable(feature = "rustdoc", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs
index 4a766f14531..c919c335640 100644
--- a/src/libserialize/lib.rs
+++ b/src/libserialize/lib.rs
@@ -20,7 +20,7 @@ Core encoding and decoding interfaces.
 #![unstable(feature = "rustc_private",
             reason = "deprecated in favor of rustc-serialize on crates.io",
             issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 9700e95ed0f..37a58fdeda4 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -202,7 +202,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "std"]
 #![stable(feature = "rust1", since = "1.0.0")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 59cc380b0ec..475408472ee 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -18,7 +18,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "syntax"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs
index f33530f93d1..478b0b846ed 100644
--- a/src/libterm/lib.rs
+++ b/src/libterm/lib.rs
@@ -47,7 +47,7 @@
 #![unstable(feature = "rustc_private",
             reason = "use the crates.io `term` library instead",
             issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 89442fe1096..125677dc932 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -27,7 +27,7 @@
 #![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "test"]
 #![unstable(feature = "test", issue = "27812")]
-#![staged_api]
+#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/test/auxiliary/inherited_stability.rs b/src/test/auxiliary/inherited_stability.rs
index 82c63a6c208..0b1aee68f44 100644
--- a/src/test/auxiliary/inherited_stability.rs
+++ b/src/test/auxiliary/inherited_stability.rs
@@ -11,7 +11,6 @@
 #![crate_type = "lib"]
 #![unstable(feature = "test_feature", issue = "0")]
 #![feature(staged_api)]
-#![staged_api]
 
 pub fn unstable() {}
 
diff --git a/src/test/auxiliary/internal_unstable.rs b/src/test/auxiliary/internal_unstable.rs
index 20eb99fe91c..a4cd487eb65 100644
--- a/src/test/auxiliary/internal_unstable.rs
+++ b/src/test/auxiliary/internal_unstable.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 #![feature(staged_api, allow_internal_unstable)]
-#![staged_api]
 #![stable(feature = "stable", since = "1.0.0")]
 
 #[unstable(feature = "function", issue = "0")]
diff --git a/src/test/auxiliary/lint_output_format.rs b/src/test/auxiliary/lint_output_format.rs
index 4116c230497..0553b4a49b7 100644
--- a/src/test/auxiliary/lint_output_format.rs
+++ b/src/test/auxiliary/lint_output_format.rs
@@ -11,7 +11,6 @@
 #![crate_name="lint_output_format"]
 #![crate_type = "lib"]
 #![feature(staged_api)]
-#![staged_api]
 #![unstable(feature = "test_feature", issue = "0")]
 
 #[stable(feature = "test_feature", since = "1.0.0")]
diff --git a/src/test/auxiliary/lint_stability.rs b/src/test/auxiliary/lint_stability.rs
index 555e88c3489..09d8302095f 100644
--- a/src/test/auxiliary/lint_stability.rs
+++ b/src/test/auxiliary/lint_stability.rs
@@ -10,7 +10,6 @@
 #![crate_name="lint_stability"]
 #![crate_type = "lib"]
 #![feature(staged_api)]
-#![staged_api]
 #![stable(feature = "lint_stability", since = "1.0.0")]
 
 #[stable(feature = "test_feature", since = "1.0.0")]
diff --git a/src/test/auxiliary/lint_stability_fields.rs b/src/test/auxiliary/lint_stability_fields.rs
index c4a53d8477a..8c6b98ab510 100644
--- a/src/test/auxiliary/lint_stability_fields.rs
+++ b/src/test/auxiliary/lint_stability_fields.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 #![feature(staged_api)]
-#![staged_api]
 #![stable(feature = "rust1", since = "1.0.0")]
 
 #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/src/test/auxiliary/stability_attribute_issue.rs b/src/test/auxiliary/stability_attribute_issue.rs
index 69560d15b5f..22c13f69af9 100644
--- a/src/test/auxiliary/stability_attribute_issue.rs
+++ b/src/test/auxiliary/stability_attribute_issue.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 #![feature(staged_api)]
-#![staged_api]
 #![stable(feature = "foo", since = "1.2.0")]
 
 
diff --git a/src/test/auxiliary/stability_cfg1.rs b/src/test/auxiliary/stability_cfg1.rs
index 3a92cf59611..c839993b047 100644
--- a/src/test/auxiliary/stability_cfg1.rs
+++ b/src/test/auxiliary/stability_cfg1.rs
@@ -11,4 +11,3 @@
 #![cfg_attr(foo, experimental)]
 #![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
 #![feature(staged_api)]
-#![staged_api]
diff --git a/src/test/auxiliary/stability_cfg2.rs b/src/test/auxiliary/stability_cfg2.rs
index 8277280f069..c1e2b1d1bfe 100644
--- a/src/test/auxiliary/stability_cfg2.rs
+++ b/src/test/auxiliary/stability_cfg2.rs
@@ -13,4 +13,3 @@
 #![cfg_attr(foo, unstable(feature = "test_feature", issue = "0"))]
 #![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
 #![feature(staged_api)]
-#![staged_api]
diff --git a/src/test/compile-fail/issue-17337.rs b/src/test/compile-fail/issue-17337.rs
index a4756cd964d..1208321b529 100644
--- a/src/test/compile-fail/issue-17337.rs
+++ b/src/test/compile-fail/issue-17337.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 #![feature(staged_api)]
-#![staged_api]
 #![deny(deprecated)]
 
 #![unstable(feature = "test_feature", issue = "0")]
diff --git a/src/test/compile-fail/lint-forbid-cmdline.rs b/src/test/compile-fail/lint-forbid-cmdline.rs
index be927297be7..dfa6866f66e 100644
--- a/src/test/compile-fail/lint-forbid-cmdline.rs
+++ b/src/test/compile-fail/lint-forbid-cmdline.rs
@@ -11,7 +11,6 @@
 // compile-flags: -F deprecated
 
 #![feature(staged_api)]
-#![staged_api]
 #[allow(deprecated)] //~ ERROR allow(deprecated) overruled by outer forbid(deprecated)
 fn main() {
 }
diff --git a/src/test/compile-fail/lint-stability-fields.rs b/src/test/compile-fail/lint-stability-fields.rs
index 3a86bcc0246..d63e1f901f5 100644
--- a/src/test/compile-fail/lint-stability-fields.rs
+++ b/src/test/compile-fail/lint-stability-fields.rs
@@ -12,7 +12,6 @@
 #![deny(deprecated)]
 #![allow(dead_code)]
 #![feature(staged_api)]
-#![staged_api]
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs
index 30d84786ede..f32d7db244b 100644
--- a/src/test/compile-fail/lint-stability.rs
+++ b/src/test/compile-fail/lint-stability.rs
@@ -16,7 +16,6 @@
 #![deny(deprecated)]
 #![allow(dead_code)]
 #![feature(staged_api)]
-#![staged_api]
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
diff --git a/src/test/compile-fail/missing-stability.rs b/src/test/compile-fail/missing-stability.rs
index 83ba9d95daf..a727ecc76b7 100644
--- a/src/test/compile-fail/missing-stability.rs
+++ b/src/test/compile-fail/missing-stability.rs
@@ -12,7 +12,6 @@
 
 #![crate_type="lib"]
 #![feature(staged_api)]
-#![staged_api]
 
 #![stable(feature = "test_feature", since = "1.0.0")]
 
diff --git a/src/test/compile-fail/stability-attribute-sanity-2.rs b/src/test/compile-fail/stability-attribute-sanity-2.rs
index 82627daf7ff..d978d4ce0ea 100644
--- a/src/test/compile-fail/stability-attribute-sanity-2.rs
+++ b/src/test/compile-fail/stability-attribute-sanity-2.rs
@@ -11,7 +11,6 @@
 // More checks that stability attributes are used correctly
 
 #![feature(staged_api)]
-#![staged_api]
 
 #![stable(feature = "test_feature", since = "1.0.0")]
 
diff --git a/src/test/compile-fail/stability-attribute-sanity.rs b/src/test/compile-fail/stability-attribute-sanity.rs
index 038d6a8ec07..8c7c0c275db 100644
--- a/src/test/compile-fail/stability-attribute-sanity.rs
+++ b/src/test/compile-fail/stability-attribute-sanity.rs
@@ -11,7 +11,6 @@
 // Various checks that stability attributes are used correctly, per RFC 507
 
 #![feature(staged_api)]
-#![staged_api]
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
diff --git a/src/test/run-make/allow-warnings-cmdline-stability/bar.rs b/src/test/run-make/allow-warnings-cmdline-stability/bar.rs
index 9c24694951a..fed1405b7f4 100644
--- a/src/test/run-make/allow-warnings-cmdline-stability/bar.rs
+++ b/src/test/run-make/allow-warnings-cmdline-stability/bar.rs
@@ -10,7 +10,6 @@
 
 #![crate_type = "lib"]
 #![feature(staged_api)]
-#![staged_api]
 #![unstable(feature = "test_feature", issue = "0")]
 
 pub fn baz() { }
diff --git a/src/test/rustdoc/issue-18199.rs b/src/test/rustdoc/issue-18199.rs
index 27e6e17a79c..275947a18a5 100644
--- a/src/test/rustdoc/issue-18199.rs
+++ b/src/test/rustdoc/issue-18199.rs
@@ -13,7 +13,6 @@
 #![doc(test(attr(feature(staged_api))))]
 
 /// ```
-/// #![staged_api]
 /// #![unstable(feature="test", issue="18199")]
 /// fn main() {}
 /// ```
diff --git a/src/test/rustdoc/issue-27759.rs b/src/test/rustdoc/issue-27759.rs
index dbe12b80b3e..fe40ce2bd7d 100644
--- a/src/test/rustdoc/issue-27759.rs
+++ b/src/test/rustdoc/issue-27759.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 #![feature(staged_api)]
-#![staged_api]
 #![doc(issue_tracker_base_url = "http://issue_url/")]
 
 #![unstable(feature="test", issue="27759")]