From 2273b5202354b3091f493cfcfa5bf48165e92b1e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 21 Jan 2016 15:26:19 -0800 Subject: [PATCH] mk: Move from `-D warnings` to `#![deny(warnings)]` This commit removes the `-D warnings` flag being passed through the makefiles to all crates to instead be a crate attribute. We want these attributes always applied for all our standard builds, and this is more amenable to Cargo-based builds as well. Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)` attribute currently to match the same semantics we have today --- mk/target.mk | 8 -------- src/liballoc/lib.rs | 1 + src/liballoc_jemalloc/lib.rs | 1 + src/liballoc_system/lib.rs | 1 + src/libarena/lib.rs | 1 + src/libcollections/lib.rs | 1 + src/libcore/lib.rs | 1 + src/libflate/lib.rs | 1 + src/libfmt_macros/lib.rs | 1 + src/libgraphviz/lib.rs | 1 + src/liblog/lib.rs | 1 + src/librand/lib.rs | 1 + src/librbml/lib.rs | 1 + src/librustc/lib.rs | 5 +++-- src/librustc_back/lib.rs | 1 + src/librustc_bitflags/lib.rs | 1 + src/librustc_borrowck/lib.rs | 1 + src/librustc_data_structures/lib.rs | 1 + src/librustc_driver/lib.rs | 1 + src/librustc_front/lib.rs | 5 +++-- src/librustc_lint/lib.rs | 1 + src/librustc_llvm/lib.rs | 1 + src/librustc_metadata/lib.rs | 5 +++-- src/librustc_mir/lib.rs | 1 + src/librustc_passes/lib.rs | 5 +++-- src/librustc_platform_intrinsics/lib.rs | 1 + src/librustc_plugin/lib.rs | 5 +++-- src/librustc_privacy/lib.rs | 1 + src/librustc_resolve/lib.rs | 1 + src/librustc_trans/lib.rs | 1 + src/librustc_typeck/lib.rs | 1 + src/librustc_unicode/lib.rs | 1 + src/librustdoc/lib.rs | 1 + src/libserialize/lib.rs | 1 + src/libstd/lib.rs | 1 + src/libsyntax/lib.rs | 1 + src/libsyntax_ext/lib.rs | 4 ++-- src/libterm/lib.rs | 1 + src/libtest/lib.rs | 1 + 39 files changed, 49 insertions(+), 20 deletions(-) diff --git a/mk/target.mk b/mk/target.mk index f90b09479c98..32a3eb5c20d2 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -17,14 +17,6 @@ export CFG_COMPILER_HOST_TRIPLE export CFG_DEFAULT_LINKER export CFG_DEFAULT_AR -# The standard libraries should be held up to a higher standard than any old -# code, make sure that these common warnings are denied by default. These can -# be overridden during development temporarily. For stage0, we allow warnings -# which may be bugs in stage0 (should be fixed in stage1+) -RUST_LIB_FLAGS_ST0 += -W warnings -RUST_LIB_FLAGS_ST1 += -D warnings -RUST_LIB_FLAGS_ST2 += -D warnings - # Macro that generates the full list of dependencies for a crate at a particular # stage/target/host tuple. # diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 0a232ed0620d..403baa4a7b26 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -70,6 +70,7 @@ test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))] #![no_std] #![needs_allocator] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(allocator)] #![feature(box_syntax)] diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs index 91d229b819df..b009dfd8c751 100644 --- a/src/liballoc_jemalloc/lib.rs +++ b/src/liballoc_jemalloc/lib.rs @@ -16,6 +16,7 @@ reason = "this library is unlikely to be stabilized in its current \ form or name", issue = "27783")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(allocator)] #![feature(libc)] #![feature(staged_api)] diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index ffb6999d6e3f..8a9e32daa728 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -12,6 +12,7 @@ #![crate_type = "rlib"] #![no_std] #![allocator] +#![cfg_attr(not(stage0), deny(warnings))] #![unstable(feature = "alloc_system", reason = "this library is unlikely to be stabilized in its current \ form or name", diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index cd2093984e61..46a63390c835 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -27,6 +27,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/", test(no_crate_inject, attr(deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(alloc)] #![feature(core_intrinsics)] diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index 6077a4c01045..a3c05c5a6813 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -28,6 +28,7 @@ #![allow(trivial_casts)] #![cfg_attr(test, allow(deprecated))] // rand +#![cfg_attr(not(stage0), deny(warnings))] #![feature(alloc)] #![feature(box_patterns)] diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index e8803976937d..f76b8655ad1e 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -56,6 +56,7 @@ #![no_core] #![deny(missing_docs)] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(allow_internal_unstable)] #![feature(associated_type_defaults)] diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs index a60a1c67e175..f316250d96d7 100644 --- a/src/libflate/lib.rs +++ b/src/libflate/lib.rs @@ -22,6 +22,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(libc)] #![feature(staged_api)] diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs index 7a229ad52222..07d26cddfdb8 100644 --- a/src/libfmt_macros/lib.rs +++ b/src/libfmt_macros/lib.rs @@ -23,6 +23,7 @@ html_root_url = "https://doc.rust-lang.org/nightly/", html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(staged_api)] #![feature(unicode)] diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index 38b45ec0feae..2e26cc1b2660 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -280,6 +280,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(allow(unused_variables), deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(str_escape)] diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index dbd553acd68f..011f5a744dc8 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -168,6 +168,7 @@ html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))] #![deny(missing_docs)] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(box_syntax)] #![feature(const_fn)] diff --git a/src/librand/lib.rs b/src/librand/lib.rs index 06f4c8dfd20a..9640322a2dd6 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -23,6 +23,7 @@ html_root_url = "https://doc.rust-lang.org/nightly/", html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![no_std] #![unstable(feature = "rand", reason = "use `rand` from crates.io", diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs index 913314c4899a..8404026df143 100644 --- a/src/librbml/lib.rs +++ b/src/librbml/lib.rs @@ -120,6 +120,7 @@ html_root_url = "https://doc.rust-lang.org/nightly/", html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(rustc_private)] #![feature(staged_api)] diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 4d772de78359..3167deb5cbdf 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -19,8 +19,9 @@ #![crate_type = "dylib"] #![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", - html_root_url = "https://doc.rust-lang.org/nightly/")] + html_favicon_url = "https://doc.rust-lang.org/favicon.ico", + html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(associated_consts)] #![feature(box_patterns)] diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs index 746d3ba07d60..4d8cfc238042 100644 --- a/src/librustc_back/lib.rs +++ b/src/librustc_back/lib.rs @@ -28,6 +28,7 @@ #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(box_syntax)] #![feature(libc)] diff --git a/src/librustc_bitflags/lib.rs b/src/librustc_bitflags/lib.rs index e2a929f58e14..e2025eaa8ee0 100644 --- a/src/librustc_bitflags/lib.rs +++ b/src/librustc_bitflags/lib.rs @@ -15,6 +15,7 @@ #![crate_type = "rlib"] #![no_std] #![unstable(feature = "rustc_private", issue = "27812")] +#![cfg_attr(not(stage0), deny(warnings))] //! A typesafe bitmask flag generator. diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs index d730b383a804..e7f5fddc7bbf 100644 --- a/src/librustc_borrowck/lib.rs +++ b/src/librustc_borrowck/lib.rs @@ -15,6 +15,7 @@ #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![allow(non_camel_case_types)] diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 1fbbdf17455b..2983590af324 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -23,6 +23,7 @@ #![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/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(hashmap_hasher)] #![feature(nonzero)] diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 31151e10a5a5..9a63751d8890 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -21,6 +21,7 @@ #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(box_syntax)] #![feature(libc)] diff --git a/src/librustc_front/lib.rs b/src/librustc_front/lib.rs index b12c41d060a0..02ad69e8a7c3 100644 --- a/src/librustc_front/lib.rs +++ b/src/librustc_front/lib.rs @@ -19,8 +19,9 @@ #![crate_type = "dylib"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://doc.rust-lang.org/favicon.ico", - html_root_url = "http://doc.rust-lang.org/nightly/")] + html_favicon_url = "https://doc.rust-lang.org/favicon.ico", + html_root_url = "http://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(associated_consts)] #![feature(box_patterns)] diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 78252c491ecf..6868b4f2ab76 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -26,6 +26,7 @@ #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![cfg_attr(test, feature(test))] #![feature(box_patterns)] diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index fc7fa299fb8f..f831232303bf 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -21,6 +21,7 @@ #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(associated_consts)] #![feature(box_syntax)] diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs index 42332c469697..f416ec75010f 100644 --- a/src/librustc_metadata/lib.rs +++ b/src/librustc_metadata/lib.rs @@ -13,8 +13,9 @@ #![crate_type = "dylib"] #![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", - html_root_url = "https://doc.rust-lang.org/nightly/")] + html_favicon_url = "https://doc.rust-lang.org/favicon.ico", + html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(box_patterns)] #![feature(enumset)] diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index 9cc40bbc3838..4337f62db12c 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -17,6 +17,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment! #![crate_name = "rustc_mir"] #![crate_type = "rlib"] #![crate_type = "dylib"] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(rustc_private)] diff --git a/src/librustc_passes/lib.rs b/src/librustc_passes/lib.rs index fcdbd6384d54..91bfb19aa9d6 100644 --- a/src/librustc_passes/lib.rs +++ b/src/librustc_passes/lib.rs @@ -19,8 +19,9 @@ #![crate_type = "dylib"] #![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", - html_root_url = "https://doc.rust-lang.org/nightly/")] + html_favicon_url = "https://doc.rust-lang.org/favicon.ico", + html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(rustc_diagnostic_macros)] #![feature(staged_api)] diff --git a/src/librustc_platform_intrinsics/lib.rs b/src/librustc_platform_intrinsics/lib.rs index e857434682d1..6a43ef65d6a0 100644 --- a/src/librustc_platform_intrinsics/lib.rs +++ b/src/librustc_platform_intrinsics/lib.rs @@ -13,6 +13,7 @@ #![crate_type = "dylib"] #![crate_type = "rlib"] #![feature(staged_api, rustc_private)] +#![cfg_attr(not(stage0), deny(warnings))] extern crate rustc_llvm as llvm; extern crate rustc; diff --git a/src/librustc_plugin/lib.rs b/src/librustc_plugin/lib.rs index 333c226c2a37..c55e97412bb1 100644 --- a/src/librustc_plugin/lib.rs +++ b/src/librustc_plugin/lib.rs @@ -55,8 +55,9 @@ #![crate_type = "dylib"] #![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", - html_root_url = "https://doc.rust-lang.org/nightly/")] + html_favicon_url = "https://doc.rust-lang.org/favicon.ico", + html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(dynamic_lib)] #![feature(staged_api)] diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index cfd0540cc60e..929ec523f639 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -15,6 +15,7 @@ #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(rustc_diagnostic_macros)] #![feature(rustc_private)] diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 444c43163e3c..b648af7fe2b0 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -15,6 +15,7 @@ #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(associated_consts)] #![feature(borrow_state)] diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index c1ab0284ade5..9ab056a187b6 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -21,6 +21,7 @@ #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index 17d71fa7be9a..49de0efa61d4 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -70,6 +70,7 @@ This API is completely unstable and subject to change. #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] +#![cfg_attr(not(stage0), deny(warnings))] #![allow(non_camel_case_types)] diff --git a/src/librustc_unicode/lib.rs b/src/librustc_unicode/lib.rs index 161da0791106..4cbcfd5a0b2a 100644 --- a/src/librustc_unicode/lib.rs +++ b/src/librustc_unicode/lib.rs @@ -29,6 +29,7 @@ html_playground_url = "https://play.rust-lang.org/", issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/", test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![no_std] #![feature(core_char_ext)] diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index ac5b64f37aaf..c52459f6c105 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -16,6 +16,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/", html_playground_url = "https://play.rust-lang.org/")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(box_patterns)] #![feature(box_syntax)] diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index 910600d91e45..ee5e40adc9c9 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -25,6 +25,7 @@ Core encoding and decoding interfaces. html_root_url = "https://doc.rust-lang.org/nightly/", html_playground_url = "https://play.rust-lang.org/", test(attr(allow(unused_variables), deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(box_syntax)] #![feature(collections)] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 9adea351e3d0..bc8fafd7fb10 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -273,6 +273,7 @@ #![deny(missing_docs)] #![allow(unused_features)] // std may use features in a platform-specific way +#![cfg_attr(not(stage0), deny(warnings))] #[cfg(test)] extern crate test; #[cfg(test)] #[macro_use] extern crate log; diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 795f4044f6eb..d7d3e576a613 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -22,6 +22,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(associated_consts)] #![feature(filling_drop)] diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs index 0f049fa97925..97531d4279d4 100644 --- a/src/libsyntax_ext/lib.rs +++ b/src/libsyntax_ext/lib.rs @@ -11,13 +11,13 @@ //! Syntax extensions in the Rust compiler. #![crate_name = "syntax_ext"] +#![unstable(feature = "rustc_private", issue = "27812")] #![crate_type = "dylib"] #![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", html_root_url = "https://doc.rust-lang.org/nightly/")] - -#![unstable(feature = "rustc_private", issue = "27812")] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(rustc_private)] #![feature(staged_api)] diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index df1fedf3d4e6..771e24704558 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -52,6 +52,7 @@ html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))] #![deny(missing_docs)] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(box_syntax)] #![feature(staged_api)] diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index ac5b235854a0..130ce3a9637f 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -31,6 +31,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] +#![cfg_attr(not(stage0), deny(warnings))] #![feature(asm)] #![feature(box_syntax)]