Patrick Walton
db020ab63c
rustc: Implement and enforce instance coherence
2012-07-17 15:46:43 -07:00
Michael Sullivan
92743dc2a6
Move the world over to using the new style string literals and types. Closes #2907 .
2012-07-14 01:03:43 -07:00
Brian Anderson
1eae49748d
Ignore a should_fail test on windows
2012-07-05 23:26:41 -07:00
Ben Striegel
d162fa26ba
A new times
method on numeric types
...
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-05 19:44:20 -07:00
Gareth Daniel Smith
be0141666d
convert doc-attributes to doc-comments using ./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-07-04 19:18:13 -07:00
Brian Anderson
d1fc2b5995
Convert to new closure syntax
2012-07-01 19:19:32 -07:00
Brian Anderson
a3382b6f26
Eliminate usages of old sugared call syntax
2012-06-30 16:01:49 -07:00
Michael Sullivan
98e161f00e
Switch the compiler over to using ~[] notation instead of []/~. Closes #2759 .
2012-06-29 17:41:45 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Brian Anderson
7e6cbf7431
Remove redundant 'extension' mods from numeric mods
2012-06-25 14:25:48 -07:00
Ben Striegel
43a48ca5bb
Automatically export methods on core numeric types
...
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-25 14:25:48 -07:00
Brian Anderson
fad307d7b4
core: Convert declarations to not use the trailing 'unsafe' notation
2012-06-25 12:48:39 -07:00
Tim Chevalier
8945255559
Comments only: Annotate FIXMEs in libcore
2012-06-14 17:56:41 -07:00
Patrick Walton
e38eaed978
Add a Num typeclass
2012-06-14 10:55:49 -07:00
Erick Tryzelaar
48e877a435
Rewrite int/uint helper functions to use refs
...
This lets us pass them to generic functions.
2012-06-12 18:10:19 -07:00
Ben Striegel
d14d4155de
Allow multiple num
impls to be imported at once
...
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-09 01:36:26 -04:00
Ben Striegel
89e424d373
Inline range
for all integral types
2012-06-08 21:18:41 -04:00
Patrick Walton
e158ce8a9d
Add neg() to the num iface
2012-06-07 18:27:10 -07:00
Patrick Walton
3d7400f3ac
Add a Num typeclass
2012-06-07 16:08:38 -07:00
Tim Chevalier
a6c92f0a17
Revert "Revert "Merge pull request #2516 from mozilla/incoming" due to failures"
...
This reverts commit 9fae95860de510f6874810cf43efb83f101246ef.
2012-06-06 15:08:24 -07:00
Graydon Hoare
5f904d278f
Shave off one more string append in a rare case.
2012-06-04 19:01:24 -07:00
Graydon Hoare
7803488a43
Implement stack-only variants of int/uint str conversion and output.
2012-06-04 18:06:59 -07:00
Brian Anderson
432c6cbde9
core: Make range follow the for loop protocol
2012-05-26 02:28:00 -07:00
Brian Anderson
7c53c2bb16
core: Ignore more tests on more platforms
2012-05-16 16:17:28 -07:00
Brian Anderson
31a6eae4fc
core: Ignore int-template::test_parse_buf on windows
2012-05-16 14:33:42 -07:00
Brian Anderson
ce20ed77b2
core: Ignore int-template::test_from_str on windows
...
Alignment problems
2012-05-16 14:13:07 -07:00
Brian Anderson
2adad1f7cd
core: Generalize int-string conversions to all int types
...
Issue #2239
2012-05-15 23:46:40 -07:00
Tim Chevalier
1226669172
Comment only: add a FIXME on int::abs
2012-05-07 14:43:31 -07:00
Brian Anderson
6bb181341b
core: Factor out int/i8/16/32/64 mods into int-template
2012-04-16 12:31:34 -07:00