summary refs log tree commit diff
path: root/src/test/run-pass/numeric-method-autoexport.rs
AgeCommit message (Collapse)AuthorLines
2013-10-02std: Replace num::IntConvertible with {To,From}PrimitiveErick Tryzelaar-2/+2
2013-10-01remove the `float` typeDaniel Micay-1/+0
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-1/+1
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-13/+13
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-13/+13
2013-03-07test: Fix tests.Patrick Walton-0/+2
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-13/+13
2013-02-01check-fast fallout from removing export, r=burningtreeGraydon Hoare-1/+1
2013-01-30rustc: make integral type inference transactional, close #3211, close #4401, ↵Graydon Hoare-11/+2
close #3398.
2012-12-10Reliciense makefiles and testsuite. Yup.Graydon Hoare-0/+10
2012-09-25Demode Num trait and implsTim Chevalier-10/+10
2012-07-10Get rid of places that expected foo.bar to implicitly bind.Michael Sullivan-10/+10
2012-07-05A new `times` method on numeric typesBen Striegel-2/+15
This method is intended to elegantly subsume two common iteration functions. The first is `iter::range`, which is used identically to the method introduced in this commit, but currently works only on uints. The second is a common case of `{int, i8, uint, etc.}::range`, in the case where the inductive variable is ignored. Compare the usage of the three: ``` for iter::range(100u) { // do whatever } for int::range(0, 100) |_i| { // do whatever } for 100.times { // do whatever } ``` I feel that the latter reads much more nicely than the first two approaches, and unlike the first two the new method allows the user to ignore the specific type of the number (ineed, if we're throwing away the inductive variable, who cares what type it is?). A minor benefit is that this new method will be somewhat familiar to users of Ruby, from which we borrow the name "times".
2012-06-25Remove redundant 'extension' mods from numeric modsBrian Anderson-3/+5
2012-06-25Automatically export methods on core numeric typesBen Striegel-0/+24
Each numeric type now contains an extensions module that is automatically exported. At the moment each extensions module contains only the impl for the `num::num` iface. Other impls soon to follow (hopefully).