From bbbb571fee01532f63b105150654db8db0b01bf7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 9 Feb 2015 16:33:19 -0800 Subject: rustc: Fix a number of stability lint holes There are a number of holes that the stability lint did not previously cover, including: * Types * Bounds on type parameters on functions and impls * Where clauses * Imports * Patterns (structs and enums) These holes have all been fixed by overriding the `visit_path` function on the AST visitor instead of a few specialized cases. This change also necessitated a few stability changes: * The `collections::fmt` module is now stable (it was already supposed to be). * The `thread_local::imp::Key` type is now stable (it was already supposed to be). * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable. These are required via the `panic!` macro. * The `std::old_io::stdio::{println, println_args}` functions are now stable. These are required by the `print!` and `println!` macros. * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to make bounds with these traits stable. Note that manual implementations of these traits are still gated by default, this stability only allows bounds such as `F: FnOnce()`. Additionally, the compiler now has special logic to ignore its own generated `__test` module for the `--test` harness in terms of stability. Closes #8962 Closes #16360 Closes #20327 [breaking-change] --- src/libstd/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libstd/lib.rs') diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 967789dd411..77423cdcd31 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -164,6 +164,7 @@ pub use core::cell; pub use core::clone; #[cfg(not(test))] pub use core::cmp; pub use core::default; +#[allow(deprecated)] pub use core::finally; pub use core::hash; pub use core::intrinsics; @@ -306,8 +307,8 @@ mod std { pub use marker; // used for tls! pub use ops; // used for bitflags! - // The test runner calls ::std::os::args() but really wants realstd - #[cfg(test)] pub use realstd::os as os; + // The test runner calls ::std::env::args() but really wants realstd + #[cfg(test)] pub use realstd::env as env; // The test runner requires std::slice::Vector, so re-export std::slice just for it. // // It is also used in vec![] -- cgit 1.4.1-3-g733a5