]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #23549: aturon/stab-num
authorAlex Crichton <alex@alexcrichton.com>
Tue, 31 Mar 2015 17:15:26 +0000 (10:15 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 31 Mar 2015 17:15:26 +0000 (10:15 -0700)
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

1  2 
src/liballoc/heap.rs
src/libcollections/slice.rs
src/libcollections/vec_deque.rs
src/librbml/lib.rs
src/librustc/metadata/decoder.rs
src/librustc/middle/ty.rs
src/librustc_back/sha2.rs
src/librustc_lint/builtin.rs
src/librustc_typeck/check/mod.rs
src/libstd/io/cursor.rs
src/libstd/sys/common/wtf8.rs

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 586a1eb085c1c4e841dcba8ef76680913c872d23,b765c484bff64679d96bcb96639f24dd4d7e7480..e7443af3013aeff4519b5eae2585187b7257782f
@@@ -39,9 -39,8 +39,8 @@@ use util::ppaux::ty_to_string
  use util::nodemap::{FnvHashMap, NodeSet};
  use lint::{Level, Context, LintPass, LintArray, Lint};
  
 -use std::collections::BitSet;
 +use std::collections::{HashSet, BitSet};
  use std::collections::hash_map::Entry::{Occupied, Vacant};
- use std::num::SignedInt;
  use std::{cmp, slice};
  use std::{i8, i16, i32, i64, u8, u16, u32, u64, f32, f64};
  
Simple merge
Simple merge
Simple merge