about summary refs log tree commit diff
path: root/src/libstd/num/int_macros.rs
AgeCommit message (Collapse)AuthorLines
2013-12-05Fix documentation typo (divison operator is not backslash)Alexandros Tasos-1/+1
2013-11-29Removed module macro workaround for signed and unsigned integersMarvin Löbel-14/+2
2013-11-29Removed useless cmp::{min, max} reexports from the integer modulesMarvin Löbel-2/+0
2013-11-29Removed a few macro-expanding-to-module workaroundsMarvin Löbel-1/+3
Also documented a few issues
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-4/+4
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-1/+1
2013-10-29Work around const_eval issues by changing signed integer `min_value`s.Jed Davis-1/+2
Otherwise, run-pass/deriving-primitive.rs breaks on 32-bit platforms, because `int::min_value` is `0xffffffff7fffffff` when evaluated for the discriminant declaration.
2013-10-17std: Move size/align functions to std::mem. #2240Brian Anderson-3/+3
2013-10-05std: add Primitive.is_signedErick Tryzelaar-0/+3
2013-09-25rustdoc: Change all code-blocks with a scriptAlex Crichton-12/+12
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g' find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g' find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-20Implement a web backend for rustdoc_ngAlex Crichton-0/+1
This large commit implements and `html` output option for rustdoc_ng. The executable has been altered to be invoked as "rustdoc_ng html <crate>" and it will dump everything into the local "doc" directory. JSON can still be generated by changing 'html' to 'json'. This also fixes a number of bugs in rustdoc_ng relating to comment stripping, along with some other various issues that I found along the way. The `make doc` command has been altered to generate the new documentation into the `doc/ng/$(CRATE)` directories.
2013-09-15Remove {uint,int,u64,i64,...}::from_str,from_str_radixblake2-ppc-47/+32
Remove these in favor of the two traits themselves and the wrapper function std::from_str::from_str. Add the function std::num::from_str_radix in the corresponding role for the FromStrRadix trait.
2013-09-15std::num: Remove `range_step` for each numeric typeblake2-ppc-145/+0
Replaced by `std::iter::range_step`
2013-09-12std: Add a bunch of Default implsErick Tryzelaar-0/+6
2013-09-08auto merge of #8988 : cmr/rust/fromstr_fn, r=brsonbors-1/+1
It just calls out to the associated function on the trait.
2013-09-08Fix import order which caused the wrong from_str to be in scopeCorey Richardson-1/+1
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-1/+1
2013-08-30remove several 'ne' methodsEric Martin-2/+0
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-4/+5
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.
2013-08-22Enabled unit tests in std and extra.Vadim Chugunov-1/+0
2013-08-20rm obsolete integer to_str{,_radix} free functionsDaniel Micay-33/+23
2013-08-11num: implement CheckedDivDaniel Micay-1/+20
2013-08-09Remove redundant Ord method impls.OGINO Masanori-6/+0
Basically, generic containers should not use the default methods since a type of elements may not guarantees total order. str could use them since u8's Ord guarantees total order. Floating point numbers are also broken with the default methods because of NaN. Thanks for @thestinger. Timespec also guarantees total order AIUI. I'm unsure whether extra::semver::Identifier does so I left it alone. Proof needed. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-07Implement DoubleEndedIterator on RangeKevin Ballard-17/+1
Range is now invertable as long as its element type conforms to Integer. Remove int::range_rev() et al in favor of range().invert().
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-21/+28
2013-08-02replace `range` with an external iteratorDaniel Micay-14/+1
2013-07-10Switch over to new range_rev semantics; fix #5270.Felix S. Klock II-3/+4
2013-07-10Refactored int/uint range code in preparation for change to range_rev semantics.Felix S. Klock II-16/+72
Also added unit tests of range code to test refactoring. The num-range-rev.rs test will need to be updated when the range_rev semantics change.
2013-07-08 Replaces the free-standing functions in f32, &c.Jens Nockert-66/+0
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
2013-07-01rustc: add a lint to enforce uppercase statics.Huon Wilson-0/+2
2013-06-30Specialize to_str_common for floats/integers in strconvAlex Crichton-9/+18
This allows the integral paths to avoid allocations on the heap Closes #4424, #4423
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-1/+2
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-68/+68
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-21/+21
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-1/+1
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-05-30Require documentation by default for libstdAlex Crichton-0/+11
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+7
2013-05-28Silence various warnings throughout test modulesAlex Crichton-48/+48
2013-05-24Remove usage of the #[merge] hack with int modulesAlex Crichton-0/+933