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
Daniel Micay
a33966b2f2
add Option methods for swap_unwrap and map_consume
2013-01-13 00:48:30 -05:00
Patrick Walton
2db3abddcd
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37
Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
...
This reverts commit a8d37af247
.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 19:27:57 -08:00
Tim Chevalier
89acd1f57f
Rename option::get_default => get_or_default, get_zero => get_or_zero
2013-01-04 16:01:26 -08:00
Tim Chevalier
1f1e7e9616
Add option::get_zero
...
r=brson
Closes #3797
2013-01-04 00:46:55 -08:00
Patrick Walton
e26ca35b08
librustc: Fix the test runner, the condition system, and core test. rs=bustage
2012-12-27 17:53:04 -08:00
Patrick Walton
57c599914a
librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon
2012-12-27 10:02:54 -08:00
Erick Tryzelaar
a0ef334179
core: use movable self to clean up option/result.
2012-12-18 20:54:13 -08:00
Brian Anderson
d809e89c26
Replace some Eq impls with deriving_eq
2012-12-13 16:14:28 -08:00
Patrick Walton
33c1e47c1b
librustc: Implement moves based on type. r=nmatsakis
2012-12-04 15:38:04 -08:00
Graydon Hoare
00c856c0b1
Update license, add license boilerplate to most files. Remainder will follow.
2012-12-03 17:12:14 -08:00
Brian Anderson
8179e268ef
Register snapshots
2012-11-28 12:33:00 -08:00
Patrick Walton
318e534895
rustc: Implement explicit self for Eq and Ord. r=graydon
2012-11-19 15:33:11 -08:00
Brian Anderson
c78020ef4f
Whitespace
2012-11-08 17:11:44 -08:00
Brian J. Burg
a5718ba377
Change option::expect to not require a Copy bound, and move instead.
2012-11-08 16:25:22 -08:00
Tim Chevalier
11e92f37c1
Remove uses of binary move - <- - from tests and libraries
2012-10-23 12:10:03 -07:00
Tim Chevalier
10612ee30c
Remove superfluous by-ref in option::get, option::get_default, option::expect
...
Superficial change, no review.
2012-10-19 11:38:28 -07:00