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
Erick Tryzelaar
fe41ccec64
Rename str::to_unique to str::to_owned.
2012-10-18 11:04:59 -07:00
Tim Chevalier
30a62793fa
Make moves explicit in core tests
2012-10-12 20:43:37 -07:00
Tim Chevalier
1ab914df1d
Write option::chain and result::chain with match move
...
Closes #3590
2012-10-11 14:17:59 -07:00
Tim Chevalier
65c96f849f
Forbid deprecated modes again in core
...
Sadly, there's only one file that requires deprecated modes
(stackwalk)... So, forbid them everywhere else.
2012-10-04 16:48:57 -07:00
Tim Chevalier
fe12da0864
De-mode comm::Chan
2012-10-04 16:48:57 -07:00
Brian Anderson
c83218de12
core: Improve option docs a little
2012-10-04 15:15:09 -07:00
Tim Chevalier
f78cdcb636
Removing explicit uses of + mode
...
This removes most explicit uses of the + argument mode. Pending a
snapshot, I had to remove the forbid(deprecated_modes) pragma from
a bunch of files. I'll put it back!
+ mode still has to be used in a few places for functions that get
moved (see task.rs)
The changes outside core and std are due to the to_bytes trait and
making the compiler (with legacy modes on) agree with the libraries
(with legacy modes off) about modes.
2012-10-02 14:31:39 -07:00
Graydon Hoare
e480e19694
Attempt to fix option::test_unwrap_str breakage.
2012-10-01 16:14:30 -07:00
Graydon Hoare
1229d1c2ce
De-export option and option_iter. Part of #3583 .
2012-10-01 14:12:36 -07:00
Tim Chevalier
3639d38d5c
Add a demoded version of ptr::addr_of
...
Currently, the new version is ptr::p2::addr_of and the old one is
ptr::addr_of. This is kind of cheesy, but I need a snapshot before I
can ditch the old version, since the pipe compiler generates calls to
addr_of.
core is converted over to use the new version, std is not.
2012-09-28 22:19:01 -07:00
Brian Anderson
8766c2e35b
core: Demode patterns
2012-09-28 16:57:36 -07:00
Brian Anderson
438bdd687b
core: More option demoding
2012-09-27 17:49:10 -07:00
Brian Anderson
e8fe718bfd
core: Replace map/map_default with map_ref/map_default_ref
2012-09-26 20:15:23 -07:00
Brian Anderson
62649f0412
Check more things with deprecated_modes
2012-09-25 17:41:29 -07:00
Brian Anderson
afd91f8a56
Register snapshots. Remove redundant Eq impls, Makefile hacks
2012-09-23 23:01:49 -07:00
Brian Anderson
4a78f9b166
core: Demode option
2012-09-23 17:15:00 -07:00
Niko Matsakis
ba3eebd41d
Make it illegal to use modes in a fn signature with providing
...
an explicit variable name. (Step one to changing the defaults)
First step to #3535
2012-09-23 13:30:13 -05:00
Patrick Walton
9117dcb968
rustc: De-mode all overloaded operators
2012-09-20 09:48:05 -07:00
Tim Chevalier
c087886e93
Make moves explicit in arguments
2012-09-11 20:02:34 -07:00
Tim Chevalier
a07ea73bdb
Make moves explicit in task; also make option::unwrap take its argument by move
2012-09-10 13:36:54 -07:00
Tim Chevalier
e666fe89dd
Make more moves explicit in libcore
2012-09-10 12:38:52 -07:00
Brian Anderson
3bd1f32cd9
Convert all kind bounds to camel case. Remove send, owned keywords.
2012-09-07 18:10:11 -07:00
Brian Anderson
2572e80355
Remove 'let' syntax for struct fields
2012-09-07 14:02:33 -07:00