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/librbml/lib.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/librbml/lib.rs')
| -rw-r--r-- | src/librbml/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs index e204a2a6595..1c332509fb3 100644 --- a/src/librbml/lib.rs +++ b/src/librbml/lib.rs @@ -130,7 +130,7 @@ impl fmt::Display for Error { pub mod reader { use std::char; - use std::int; + use std::isize; use std::old_io::extensions::u64_from_be_bytes; use std::mem::transmute; use std::num::Int; @@ -440,7 +440,7 @@ pub mod reader { fn read_u8 (&mut self) -> DecodeResult<u8 > { Ok(doc_as_u8 (try!(self.next_doc(EsU8 )))) } fn read_uint(&mut self) -> DecodeResult<uint> { let v = doc_as_u64(try!(self.next_doc(EsUint))); - if v > (::std::uint::MAX as u64) { + if v > (::std::usize::MAX as u64) { Err(IntTooBig(v as uint)) } else { Ok(v as uint) @@ -461,7 +461,7 @@ pub mod reader { } fn read_int(&mut self) -> DecodeResult<int> { let v = doc_as_u64(try!(self.next_doc(EsInt))) as i64; - if v > (int::MAX as i64) || v < (int::MIN as i64) { + if v > (isize::MAX as i64) || v < (isize::MIN as i64) { debug!("FIXME \\#6122: Removing this makes this function miscompile"); Err(IntTooBig(v as uint)) } else { |
