about summary refs log tree commit diff
path: root/src/libcore/uint-template.rs
AgeCommit message (Collapse)AuthorLines
2012-08-27libcore: Fix core testPatrick Walton-8/+12
2012-08-26Camel case the option typeBrian Anderson-29/+29
2012-08-23Rename str::bytes to str::to_bytesTim Chevalier-11/+11
Closes #3245
2012-08-23Make a bunch more of the iteration functions/methods marked pure. Closes #3253.Michael Sullivan-2/+2
2012-08-17rustc: Remove a few allocations from metadata. Shaves a few milliseconds off ↵Patrick Walton-1/+1
compilation of hello world.
2012-08-15Convert more core types to camel caseBrian Anderson-3/+3
2012-08-14Make Num::from_int a static methodTim Chevalier-1/+1
2012-08-13core: Camel case some lesser-used modulesBrian Anderson-4/+4
2012-08-08Convert impls to new syntaxBrian Anderson-5/+5
2012-08-06Convert alt to match. Stop parsing altBrian Anderson-2/+2
2012-08-05Switch alts to use arrowsBrian Anderson-4/+4
2012-08-02Cleanups in the int and uint templates.Graydon Hoare-28/+32
2012-08-02Remove modes from map API and replace with regions.Niko Matsakis-12/+12
API is (for now) mostly by value, there are options to use it by reference if you like. Hash and equality functions must be pure and by reference (forward looking to the day when something like send_map becomes the standard map).
2012-08-01Convert ret to returnBrian Anderson-18/+18
2012-07-27core: Make #fmt pureBrian Anderson-2/+2
2012-07-26core: Mark a bunch of numeric functions as purePatrick Walton-11/+11
2012-07-25range() is pureNiko Matsakis-1/+1
2012-07-24Update some str functions to slices, merge as_buf and unpack_slice.Graydon Hoare-2/+2
2012-07-24Add `5.timesi() |idx| { ... }`Paul Stansifer-1/+14
2012-07-17rustc: Implement and enforce instance coherencePatrick Walton-0/+1
2012-07-14Move the world over to using the new style string literals and types. Closes ↵Michael Sullivan-29/+29
#2907.
2012-07-05A new `times` method on numeric typesBen Striegel-1/+25
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-07-04convert doc-attributes to doc-comments using ↵Gareth Daniel Smith-25/+25
./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-07-01Convert to new closure syntaxBrian Anderson-3/+3
2012-06-30Eliminate usages of old sugared call syntaxBrian Anderson-3/+3
2012-06-29Switch the compiler over to using ~[] notation instead of []/~. Closes #2759.Michael Sullivan-2/+2
2012-06-25Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725.Michael Sullivan-1/+1
2012-06-25Remove redundant 'extension' mods from numeric modsBrian Anderson-14/+11
2012-06-25Automatically export methods on core numeric typesBen Striegel-11/+13
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).
2012-06-25core: Convert declarations to not use the trailing 'unsafe' notationBrian Anderson-21/+23
2012-06-21Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.Graydon Hoare-4/+3
2012-06-14Add a Num typeclassPatrick Walton-0/+1
2012-06-12Rewrite int/uint helper functions to use refsErick Tryzelaar-15/+15
This lets us pass them to generic functions.
2012-06-09Allow multiple `num` impls to be imported at onceBen Striegel-2/+1
If we import num::num, it gets reexported implicitly and causes collisions if you try to import (for example) int::num and i8::num at the same time.
2012-06-08core: Inline unsigned range functionBrian Anderson-0/+1
2012-06-07Use #[cfg(unix)] and #[cfg(windows)] everywhereBrian Anderson-2/+2
2012-06-07Add neg() to the num ifacePatrick Walton-0/+1
2012-06-07Add a Num typeclassPatrick Walton-1/+13
2012-06-06Revert "Revert "Merge pull request #2516 from mozilla/incoming" due to failures"Tim Chevalier-0/+14
This reverts commit 9fae95860de510f6874810cf43efb83f101246ef.
2012-06-04Implement stack-only variants of int/uint str conversion and output.Graydon Hoare-24/+68
2012-06-04core: Don't allow radix 1 in uint::to_strBrian Anderson-2/+22
2012-06-04core: Make uint::to_str fasterBrian Anderson-26/+29
2012-05-26core: Make range follow the for loop protocolBrian Anderson-2/+5
2012-05-16core: Ignore more testsBrian Anderson-0/+2
2012-05-15core: Generalize uint-string conversions to all uint typesBrian Anderson-0/+116
Issue #2239
2012-04-16core: Factor out uint/u8/16/32/64 mods into uint-templateBrian Anderson-0/+45