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/sys | |
| 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/sys')
| -rw-r--r-- | src/libstd/sys/common/thread.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/c.rs | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/sys/common/thread.rs b/src/libstd/sys/common/thread.rs index 048e33399a3..b725b6c7e6e 100644 --- a/src/libstd/sys/common/thread.rs +++ b/src/libstd/sys/common/thread.rs @@ -12,7 +12,7 @@ use core::prelude::*; use boxed::Box; use mem; -use uint; +use usize; use libc; use thunk::Thunk; use sys_common::stack; @@ -25,7 +25,7 @@ use sys::{thread, stack_overflow}; #[no_stack_check] pub fn start_thread(main: *mut libc::c_void) -> thread::rust_thread_return { unsafe { - stack::record_os_managed_stack_bounds(0, uint::MAX); + stack::record_os_managed_stack_bounds(0, usize::MAX); let handler = stack_overflow::Handler::new(); let f: Box<Thunk> = mem::transmute(main); f.invoke(()); diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs index cf05733cc18..cd246e8add5 100644 --- a/src/libstd/sys/unix/c.rs +++ b/src/libstd/sys/unix/c.rs @@ -179,20 +179,20 @@ mod select { target_os = "openbsd", target_os = "linux"))] mod select { - use uint; + use usize; use libc; - pub const FD_SETSIZE: uint = 1024; + pub const FD_SETSIZE: usize = 1024; #[repr(C)] pub struct fd_set { // FIXME: shouldn't this be a c_ulong? - fds_bits: [libc::uintptr_t; (FD_SETSIZE / uint::BITS)] + fds_bits: [libc::uintptr_t; (FD_SETSIZE / usize::BITS)] } pub fn fd_set(set: &mut fd_set, fd: i32) { let fd = fd as uint; - set.fds_bits[fd / uint::BITS] |= 1 << (fd % uint::BITS); + set.fds_bits[fd / usize::BITS] |= 1 << (fd % usize::BITS); } } |
