diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-09 16:33:19 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-11 12:14:59 -0800 |
| commit | bbbb571fee01532f63b105150654db8db0b01bf7 (patch) | |
| tree | e3d8b2c3105e2c0dfb861ccc43b5f02d876c8518 /src/libstd/old_io/stdio.rs | |
| parent | 446bc899b28e988f4252beca0d1858e7f7d866b1 (diff) | |
| download | rust-bbbb571fee01532f63b105150654db8db0b01bf7.tar.gz rust-bbbb571fee01532f63b105150654db8db0b01bf7.zip | |
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]
Diffstat (limited to 'src/libstd/old_io/stdio.rs')
| -rw-r--r-- | src/libstd/old_io/stdio.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd/old_io/stdio.rs b/src/libstd/old_io/stdio.rs index 70400619bea..0669af9cf9a 100644 --- a/src/libstd/old_io/stdio.rs +++ b/src/libstd/old_io/stdio.rs @@ -48,7 +48,7 @@ use str::StrExt; use string::String; use sys::{fs, tty}; use sync::{Arc, Mutex, MutexGuard, Once, ONCE_INIT}; -use uint; +use usize; use vec::Vec; // And so begins the tale of acquiring a uv handle to a stdio stream on all @@ -383,12 +383,14 @@ pub fn println(s: &str) { /// Similar to `print`, but takes a `fmt::Arguments` structure to be compatible /// with the `format_args!` macro. +#[stable(feature = "rust1", since = "1.0.0")] pub fn print_args(fmt: fmt::Arguments) { with_task_stdout(|io| write!(io, "{}", fmt)) } /// Similar to `println`, but takes a `fmt::Arguments` structure to be /// compatible with the `format_args!` macro. +#[stable(feature = "rust1", since = "1.0.0")] pub fn println_args(fmt: fmt::Arguments) { with_task_stdout(|io| writeln!(io, "{}", fmt)) } @@ -510,7 +512,7 @@ impl Writer for StdWriter { // // [1]: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1232 // [2]: http://www.mail-archive.com/log4net-dev@logging.apache.org/msg00661.html - let max_size = if cfg!(windows) {8192} else {uint::MAX}; + let max_size = if cfg!(windows) {8192} else {usize::MAX}; for chunk in buf.chunks(max_size) { try!(match self.inner { TTY(ref mut tty) => tty.write(chunk), |
