summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-05-23swap_ptr: rm equality checkDaniel Micay-3/+2
This isn't needed semantically, and it's the wrong case to optimize for.
2013-05-23cleanup warnings from libstdErick Tryzelaar-566/+545
2013-05-23core: remove iter_bytes helper functionsErick Tryzelaar-36/+0
2013-05-22libstd: Fix merge fallout.Patrick Walton-0/+3238
2013-05-22syntax: Change syntax extensions to expand to `std::foo` instead of `core::foo`Patrick Walton-0/+10
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-7/+8
to libextra
2013-05-22librustc: Rename core injection to std injectionPatrick Walton-2/+3
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-32134/+52668
This only changes the directory names; it does not change the "real" metadata names.
2013-05-22add smallintsetJihyun Yu-1/+242
2013-05-20auto merge of #6647 : alexcrichton/rust/unnecessary-alloc, r=graydonbors-60/+60
This adds a lint mode for detecting unnecessary allocations on the heap. This isn't super fancy, currently it only has two rules 1. For a function's arguments, if you allocate a `[~|@]str` literal, when the type of the argument is a `&str`, emit a warning. 2. For the same case, emit warnings for boxed vectors when slices are required. After adding the lint, I rampaged through the libraries and removed all the unnecessary allocations I could find.
2013-05-20auto merge of #6372 : brson/rust/intrinsics, r=catamorphismbors-12/+6
...s
2013-05-20auto merge of #6639 : osaut/rust/arc-clean, r=brsonbors-4/+34
* Add ARC::get method and implements the function from it. * Add an example showing a simple use of ARC. Update PR #6622 to avoid git noise. I will remove the function get later.
2013-05-20Replace all uses of rust-intrinsic ABI with calls to unstable::intrinsicsBrian Anderson-12/+6
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-60/+60
2013-05-20Remove two warnings about unneccesary safe blocks.Steve Klabnik-6/+2
Since a snapshot was done last night, these are good to go.
2013-05-20Add ARC::get method and implements the function from it. Add an example ↵Olivier Saut-2/+32
showing a simple use of ARC.
2013-05-20Typo corrected and updated copyright yearsOlivier Saut-2/+2
2013-05-19Register snapshotsBrian Anderson-1814/+0
2013-05-19auto merge of #6106 : thestinger/rust/iter, r=bstriebors-16/+11
I don't have a strong opinion on the function vs. method, but there's no point in having both. I'd like to make a `repeat` adaptor like Python/Haskell for turning a value into an infinite stream of the value, so this has to at least be renamed.
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-547/+547
2013-05-18auto merge of #6577 : brson/rust/io-upstream, r=pcwaltonbors-16/+9
r? This is all of my scheduler work on #4419 from the last 3 weeks or so. I've had a few failed pull requests so far but I think the problems are ironed out. * TCP * The beginnings of runtime embedding APIs * Porting various corners of core to be compatible with both schedulers * libuv timer bindings * Further refinement of I/O error handling, including a new, incomplete, `read_error` condition * Incomplete refactoring to make tasks work without coroutines and user-space scheduling * Implementations of Reader/Writer extension methods * Implementations of the most important part of core::comm I'm particularly happy with how easy the [comm types on top of the scheduler](https://github.com/brson/rust/blob/io-upstream/src/libcore/rt/comm.rs). Note that these implementations do not use pipes. If anything here needs careful review though it's this code. This branch passes 95% of the run-pass tests (with `TESTARGS=--newrt`) In the next week I'll probably spend some time adding preliminary multithreading and seeing how close we are to removing the old runtime.
2013-05-18Remove trailing whitespacesOlivier Saut-1/+1
2013-05-18replace old_iter::repeat with the Times traitDaniel Micay-16/+11
2013-05-17core: Wire up oneshot pipes to newschedBrian Anderson-12/+5
2013-05-17Merge remote-tracking branch 'brson/io' into incomingBrian Anderson-4/+4
2013-05-17Correct the example given for a future, add punctuation where necessaryOlivier Saut-6/+8
2013-05-18rustc: relax limits on (u)int type limit lint. Fixes #6130.Huon Wilson-1/+1
2013-05-16auto merge of #6520 : thestinger/rust/rc, r=pcwaltonbors-42/+66
This is still enough to prevent cycles (explanation given in the docstring).
2013-05-15allow constructing Rc/RcMut from Const types tooDaniel Micay-42/+66
2013-05-16syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].Huon Wilson-18/+6
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual code, leaving stubs to refer the user to the new syntax.
2013-05-15auto merge of #6498 : thestinger/rust/deep_clone, r=thestingerbors-5/+73
This is mostly for `std::rc` and `std::arc` (but I haven't implemented it for ARC yet). Implementing it correctly for managed boxes is *very* non-trivial. It would probably require an unholy mix of reflection and TLS.
2013-05-15Merge remote-tracking branch 'brson/io' into incomingBrian Anderson-4/+4
2013-05-15core::rt: Add uv timer bindingsBrian Anderson-4/+4
2013-05-15auto merge of #6487 : recrack/rust/vec_len, r=thestingerbors-29/+25
Rename vec::len(var) to var.len() ``` libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax test/auxiliary test/bench test/run-pass ```
2013-05-15rc: fix testsDaniel Micay-15/+7
2013-05-15add a DeepClone traitDaniel Micay-4/+80
for deep copies through shared ownership boundaries
2013-05-15Rename vec::len(var) to var.len()Youngmin Yoo-29/+25
2013-05-14auto merge of #6333 : bjz/rust/cond-macro, r=thestingerbors-28/+24
Addressing issue #6037, this Scheme-style conditional helps to improve code clarity in instances where the `if`, `else if`, and `else` keywords obscure predicates undesirably. Here is an example: ~~~rust let clamped = if x > mx { mx } else if x < mn { mn } else { x }; ~~~ Using `cond!`, the above could be written as: ~~~rust let clamped = cond!( (x > mx) { mx } (x < mn) { mn } _ { x } ); ~~~ The optional default case is denoted by `_`. I have altered `std::fun_treemap` to demonstrate it in use. I am definitely interested in using it for some of the numeric functions, but I will have to wait for it to reach `stage0` first.
2013-05-15Use parentheses for cond! macro instead of preceding pipesBrendan Zabarauskas-4/+4
This is temporary. Once the macro parser has improved or been re-written these can be removed.
2013-05-14auto merge of #6471 : gifnksm/rust/reform-rational, r=brsonbors-84/+126
`std::ratio` module contains `BigRational` type, but the type is not usable by following reasons. * `Ratio::new` requires `T: Copy + Num + Ord`, but `BigInt` is not implicitly copyable, because it contains unique vector. * `BigInt` is not implements `Num` So, I rewrite `Ratio` as follows. * `Ratio` requires `T: Clone + Integer + Ord`. * `Copy` -> `Clone`: to be able to use `BigRational` * `Num` -> `Integer`: It is incorrect that a rational number constructed by two non-integer numbers. * `BigInt` implements `Num` and `Orderable` which are required by `Integer` bound
2013-05-15Add Scheme-style `cond!` macro to syntax::ext::expandBrendan Zabarauskas-28/+24
Addresses issue #6037
2013-05-14Ignore two failing flatpipes testsBrian Anderson-0/+2
2013-05-14rusti: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-4/+4
2013-05-14Fix cosmetics for fail!() callsMarvin Löbel-13/+8
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-129/+123
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-14libstd: Add tests for BigRationalgifnksm-20/+56
2013-05-14libstd: `Ratio` requires `Clone` instead of `Copy`gifnksm-23/+28
This allows creating `Ratio<T>` which `T` is non-implicitly copyable types such as `BigInt`.
2013-05-14libstd: `Rational` requires `Integer` as type bounds instead of `Num`gifnksm-53/+14
2013-05-14libstd: impl `Orderable` for `BigUint`/`BigInt`gifnksm-1/+37
2013-05-14libstd: impl Num for BigUint/BigIntgifnksm-0/+4