about summary refs log tree commit diff
path: root/src/libcore/option.rs
AgeCommit message (Collapse)AuthorLines
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-5/+5
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-13Remove re-exports from libcore/core.rcAlex Crichton-0/+1
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude.
2013-05-10core: Use the new `for` protocolAlex Crichton-0/+18
2013-05-04Register snapshotsBrian Anderson-104/+0
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-8/+0
2013-04-29test: Fix tests.Patrick Walton-2/+2
2013-04-29librustc: Remove `ptr::addr_of`.Patrick Walton-7/+8
2013-04-28make way for a new iter moduleDaniel Micay-9/+9
2013-04-10core: changes in response to #5656Niko Matsakis-0/+104
2013-04-05Refactor so that references to traits are not represented using a type with aNiko Matsakis-1/+27
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-03-29librustc: Remove `fail_unless!`Patrick Walton-8/+8
2013-03-26option: rm functions that duplicate methodsDaniel Micay-243/+104
2013-03-23core: derive Clone for core typesAndrew Paseltiner-1/+1
2013-03-22libcore: Remove `pure` from libcore. rs=depurePatrick Walton-38/+38
2013-03-22core: replace uses of old deriving attribute with new oneAndrew Paseltiner-1/+1
2013-03-21librustc: Forbid destructors from being attached to any structs that might ↵Patrick Walton-0/+1
contain non-Owned fields. r=nmatsakis
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-4/+4
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-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-10/+10
notation. rs=delifetiming
2013-03-14MutableIter impl for Option + use it in treemapDaniel Micay-1/+8
2013-03-12auto merge of #5328 : bstrie/rust/optadd, r=graydonbors-0/+13
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-11Implement Add on Option typesBen Striegel-0/+13
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-11core: Add rt mod and add the new scheduler codeBrian Anderson-0/+38
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-15/+15
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-8/+8
2013-03-05auto merge of #5212 : thestinger/rust/iter, r=graydonbors-11/+15
A small step towards fixing #2827
2013-03-04Adding missing imports for tests, and gate off othersAlex Crichton-0/+3
2013-03-04Remove unused imports throughout src/Alex Crichton-3/+0
2013-03-03replace option::iter with a BaseIter implDaniel Micay-11/+15
2013-02-28librustc: Mark all type implementations public. rs=impl-publicityPatrick Walton-3/+3
2013-02-27Turn old `drop` blocks into `Drop` traitsBen Striegel-1/+4
2013-02-27librustc: Forbid `pub` or `priv` before trait implementationsPatrick Walton-1/+1
2013-02-20librustc: Separate most trait bounds with '+'. rs=plussingPatrick Walton-5/+5
2013-02-15rustpkg: Massage for landing.Graydon Hoare-1/+29
2013-02-15libcore: Get rid of `move`.Luqman Aden-21/+21
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-5/+5
2013-02-10make Option's iter method use a lifetimeDaniel Micay-2/+2
2013-02-07make Option's map and map_default use a lifetimeDaniel Micay-5/+5
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-3/+0
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-5/+5
2013-01-25Fix Option camel case in commentsTyler Bindon-1/+1
2013-01-13Merge pull request #4465 from thestinger/optionTim Chevalier-1/+42
improvements to option module
2013-01-13add Option methods for in-place mutationDaniel Micay-0/+16
2013-01-14Inlining methods/functions in core.gifnksm-0/+14
Also inlining some functions which take functions as arguments.
2013-01-13avoid unwrap in Option::map_consume implementationDaniel Micay-1/+1
2013-01-13add Option map_consume_default methodDaniel Micay-0/+7
2013-01-13add Option methods for swap_unwrap and map_consumeDaniel Micay-0/+18
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-0/+1
module scope. r=tjc
2013-01-08Revert "librustc: Make unqualified identifier searches terminate at the ↵Patrick Walton-1/+0
nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-0/+1
module scope. r=tjc
2013-01-04Rename option::get_default => get_or_default, get_zero => get_or_zeroTim Chevalier-7/+7