Brian Anderson
66319b0278
Register snapshots
2013-05-19 23:34:32 -07:00
Corey Richardson
cc57ca012a
Use assert_eq! rather than assert! where possible
2013-05-19 08:16:02 -04:00
Brendan Zabarauskas
ad6ee5f4e5
Use four-space indentation, add trailing commas, and remove unnecessary uses of the return keyword
2013-05-18 17:29:19 +10:00
Brendan Zabarauskas
60ea6d6957
Convert various inner doc-comments to outer doc-comments
2013-05-18 17:29:14 +10:00
Daniel Micay
cda3ac905a
rc: fix tests
2013-05-15 04:34:31 -04:00
Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Alex Crichton
66e1e51701
Remove re-exports from libcore/core.rc
...
Also fix up all the fallout elsewhere throughout core. It's really nice being
able to have the prelude.
2013-05-13 18:51:40 -04:00
Alex Crichton
28256052a4
core: Use the new for
protocol
2013-05-10 02:46:18 -04:00
Brian Anderson
8081e8debf
Register snapshots
2013-05-04 15:43:51 -07:00
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
Patrick Walton
876483dcf4
test: Fix tests.
2013-04-29 14:30:56 -07:00
Patrick Walton
b0522a497c
librustc: Remove ptr::addr_of
.
2013-04-29 14:30:53 -07:00
Daniel Micay
46f91a0fa9
make way for a new iter module
2013-04-28 22:31:39 -04:00
Niko Matsakis
61b9e0ebfa
core: changes in response to #5656
2013-04-10 17:32:03 -07:00
Niko Matsakis
d28f734412
Refactor so that references to traits are not represented using a type with a
...
bare function store (which is not in fact a kind of value) but rather
ty::TraitRef. Removes many uses of fail!() and other telltale signs of
type-semantic mismatch.
cc #4183 (not a fix, but related)
2013-04-05 05:36:02 -04:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Daniel Micay
34c5a09ce3
option: rm functions that duplicate methods
2013-03-26 22:44:40 -04:00
Andrew Paseltiner
2b83defa4a
core: derive Clone for core types
2013-03-23 06:54:13 -04:00
Patrick Walton
be9bddd463
libcore: Remove pure
from libcore. rs=depure
2013-03-22 10:29:17 -07:00
Andrew Paseltiner
98e8fe12d2
core: replace uses of old deriving attribute with new one
2013-03-22 06:24:19 -04:00
Patrick Walton
d4fee24c7c
librustc: Forbid destructors from being attached to any structs that might contain non-Owned fields. r=nmatsakis
2013-03-21 17:31:34 -07:00
Patrick Walton
e78f2e2ac5
librustc: Make the compiler ignore purity.
...
For bootstrapping purposes, this commit does not remove all uses of
the keyword "pure" -- doing so would cause the compiler to no longer
bootstrap due to some syntax extensions ("deriving" in particular).
Instead, it makes the compiler ignore "pure". Post-snapshot, we can
remove "pure" from the language.
There are quite a few (~100) borrow check errors that were essentially
all the result of mutable fields or partial borrows of `@mut`. Per
discussions with Niko I think we want to allow partial borrows of
`@mut` but detect obvious footguns. We should also improve the error
message when `@mut` is erroneously reborrowed.
2013-03-18 17:21:16 -07:00
Patrick Walton
352c070365
librustc: Convert all uses of old lifetime notation to new lifetime notation. rs=delifetiming
2013-03-18 17:21:14 -07:00
Daniel Micay
a49ccee68e
MutableIter impl for Option + use it in treemap
2013-03-14 23:44:25 -04:00
bors
a95b933350
auto merge of #5328 : bstrie/rust/optadd, r=graydon
...
This will allow you to use the `+` operator to add together any two
Options, assuming that the contents of each Option likewise implement
`+`. So Some(4) + Some(1) == Some(5), and adding with None leaves the
other value unchanged.
This might be monoidic? I don't know what that word means!
2013-03-12 00:57:43 -07:00
Ben Striegel
a21b43c6bb
Implement Add on Option types
...
This will allow you to use the + operator to add together any two
Options, assuming that the contents of each Option likewise implement
+. So Some(4) + Some(1) == Some(5), and adding with None leaves the
other value unchanged.
This might be monoidic? I don't know what that word means!
2013-03-11 22:46:16 -04:00
Brian Anderson
676e0290ed
core: Add rt mod and add the new scheduler code
2013-03-11 19:44:29 -07:00
Patrick Walton
d18f785457
librustc: Replace all uses of fn()
with &fn()
. rs=defun
2013-03-11 09:35:58 -07:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08:00
bors
eddefbc893
auto merge of #5212 : thestinger/rust/iter, r=graydon
...
A small step towards fixing #2827
2013-03-05 02:06:50 -08:00
Alex Crichton
cb4ab76e4a
Adding missing imports for tests, and gate off others
2013-03-04 12:27:01 -05:00
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05:00
Daniel Micay
af645e8487
replace option::iter with a BaseIter impl
2013-03-03 11:01:17 -05:00
Patrick Walton
107bf96ff0
librustc: Mark all type implementations public. rs=impl-publicity
2013-02-28 11:32:24 -08:00
Ben Striegel
43d43adf6b
Turn old drop
blocks into Drop
traits
2013-02-27 19:14:19 -05:00
Patrick Walton
07c3f5c0de
librustc: Forbid pub
or priv
before trait implementations
2013-02-27 09:40:16 -08:00
Patrick Walton
bf2a225c0b
librustc: Separate most trait bounds with '+'. rs=plussing
2013-02-20 21:14:20 -08:00
Graydon Hoare
585d6f7b00
rustpkg: Massage for landing.
2013-02-15 18:50:51 -08:00
Luqman Aden
5912b1448c
libcore: Get rid of move
.
2013-02-15 02:49:54 -08:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
Daniel Micay
99ff74c1bd
make Option's iter method use a lifetime
2013-02-10 16:30:17 -05:00
Daniel Micay
e018244777
make Option's map and map_default use a lifetime
2013-02-07 22:04:38 -05:00
Niko Matsakis
a32498d846
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
...
correct handling of moves for struct-record update.
Part of #3678 . Fixes #2828 , #3904 , #4719 .
2013-02-07 05:53:30 -08:00
Nick Desaulniers
aee7929469
Replace most invocations of fail keyword with die! macro
2013-01-31 20:12:49 -08:00
Tyler Bindon
3a5d2cdbf3
Fix Option camel case in comments
2013-01-25 19:42:23 -07:00
Tim Chevalier
7eae397e58
Merge pull request #4465 from thestinger/option
...
improvements to option module
2013-01-13 14:29:05 -08:00
Daniel Micay
ac85bf356f
add Option methods for in-place mutation
2013-01-13 11:09:09 -05:00
gifnksm
62f2749775
Inlining methods/functions in core.
...
Also inlining some functions which take functions as arguments.
2013-01-14 00:13:44 +09:00
Daniel Micay
3c6da7761b
avoid unwrap in Option::map_consume implementation
2013-01-13 01:38:20 -05:00
Daniel Micay
65a0125f7f
add Option map_consume_default method
2013-01-13 01:37:58 -05:00