diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 10:15:26 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 10:15:26 -0700 |
| commit | 5d0beb7d85e8e711334c7fb6f2c5da270e5200cb (patch) | |
| tree | cd6181ba8612c9233c3a47aaf5e956a5610c348e /src/libserialize/json.rs | |
| parent | b3317d68910900f135f9f38e43a7a699bc736b4a (diff) | |
| parent | 232424d9952700682373ccf2d578109f401ff023 (diff) | |
| download | rust-5d0beb7d85e8e711334c7fb6f2c5da270e5200cb.tar.gz rust-5d0beb7d85e8e711334c7fb6f2c5da270e5200cb.zip | |
rollup merge of #23549: aturon/stab-num
This commit stabilizes the `std::num` module: * The `Int` and `Float` traits are deprecated in favor of (1) the newly-added inherent methods and (2) the generic traits available in rust-lang/num. * The `Zero` and `One` traits are reintroduced in `std::num`, which together with various other traits allow you to recover the most common forms of generic programming. * The `FromStrRadix` trait, and associated free function, is deprecated in favor of inherent implementations. * A wide range of methods and constants for both integers and floating point numbers are now `#[stable]`, having been adjusted for integer guidelines. * `is_positive` and `is_negative` are renamed to `is_sign_positive` and `is_sign_negative`, in order to address #22985 * The `Wrapping` type is moved to `std::num` and stabilized; `WrappingOps` is deprecated in favor of inherent methods on the integer types, and direct implementation of operations on `Wrapping<X>` for each concrete integer type `X`. Closes #22985 Closes #21069 [breaking-change] r? @alexcrichton
Diffstat (limited to 'src/libserialize/json.rs')
| -rw-r--r-- | src/libserialize/json.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index f6f059f7210..2d5d8cd501a 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -204,6 +204,8 @@ use std::io::prelude::*; use std::io; use std::mem::swap; use std::num::FpCategory as Fp; +#[allow(deprecated)] +use std::num::wrapping::WrappingOps; use std::ops::Index; use std::str::FromStr; use std::string; @@ -1552,6 +1554,7 @@ impl<T: Iterator<Item=char>> Parser<T> { } } + #[allow(deprecated)] // possible resolve bug is mapping these to traits fn parse_u64(&mut self) -> Result<u64, ParserError> { let mut accum = 0; let last_accum = 0; // necessary to detect overflow. |
