rust/src/libstd/num
Brendan Zabarauskas e37327bfee Decouple integer formatting from std::num::strconv
This works towards a complete rewrite and ultimate removal of the `std::num::strconv` module (see #6220), and the removal of the `ToStrRadix` trait in favour of using the `std::fmt` functionality directly. This should make for a cleaner API, encourage less allocation, and make the implementation far more comprehensible.

The `Formatter::pad_integral` method has also been refactored make it easier to understand.

The formatting tests for integers have been moved out of `run-pass/ifmt.rs` in order to provide more immediate feedback when building using `make check-stage2-std NO_REBUILD=1`.

The benchmarks have been standardised between std::num::strconv and std::num::fmt to make it easier to compare the performance of the different implementations.

Arbitrary radixes are now easier to use in format strings. For example:

~~~
assert_eq!(format!("{:04}", radix(3, 2)), ~"0011");
~~~
2014-02-22 03:56:16 +11:00
..
cmath.rs Clean up std::num::cmath and remove stale comments 2014-01-13 10:33:54 +11:00
f32.rs move extra::test to libtest 2014-02-20 16:03:58 +08:00
f64.rs move extra::test to libtest 2014-02-20 16:03:58 +08:00
float_macros.rs Remove ApproxEq and assert_approx_eq! 2014-01-09 15:41:46 +11:00
i8.rs Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros 2014-02-17 13:55:06 +11:00
i16.rs Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros 2014-02-17 13:55:06 +11:00
i32.rs Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros 2014-02-17 13:55:06 +11:00
i64.rs Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros 2014-02-17 13:55:06 +11:00
int_macros.rs Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros 2014-02-17 13:55:06 +11:00
int.rs Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros 2014-02-17 13:55:06 +11:00
mod.rs Decouple integer formatting from std::num::strconv 2014-02-22 03:56:16 +11:00
strconv.rs Decouple integer formatting from std::num::strconv 2014-02-22 03:56:16 +11:00
u8.rs Merge Bitwise and BitCount traits and remove from prelude, along with Bounded 2014-01-16 11:51:33 +11:00
u16.rs Merge Bitwise and BitCount traits and remove from prelude, along with Bounded 2014-01-16 11:51:33 +11:00
u32.rs Merge Bitwise and BitCount traits and remove from prelude, along with Bounded 2014-01-16 11:51:33 +11:00
u64.rs Enable 64-bit checked multiplication on 32-bit 2014-02-14 19:26:41 -08:00
uint_macros.rs Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros 2014-02-17 13:55:06 +11:00
uint.rs Move int and uint overflow tests into macros 2014-02-01 13:03:02 +11:00