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:👿: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]
This commit is contained in:
parent
446bc899b2
commit
bbbb571fee
35 changed files with 187 additions and 127 deletions
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
//! Implementations of serialization for structures found in libcollections
|
||||
|
||||
use std::uint;
|
||||
use std::usize;
|
||||
use std::default::Default;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::collections::hash_state::HashState;
|
||||
|
|
@ -148,7 +148,7 @@ impl<
|
|||
fn decode<D: Decoder>(d: &mut D) -> Result<EnumSet<T>, D::Error> {
|
||||
let bits = try!(d.read_uint());
|
||||
let mut set = EnumSet::new();
|
||||
for bit in 0..uint::BITS {
|
||||
for bit in 0..usize::BITS {
|
||||
if bits & (1 << bit) != 0 {
|
||||
set.insert(CLike::from_usize(1 << bit));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ Core encoding and decoding interfaces.
|
|||
#![feature(int_uint)]
|
||||
#![feature(io)]
|
||||
#![feature(path)]
|
||||
#![feature(hash)]
|
||||
#![feature(rustc_private)]
|
||||
#![feature(slicing_syntax)]
|
||||
#![feature(staged_api)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue