about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2013-05-14Fix cosmetics for fail!() callsMarvin Löbel-18/+13
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-125/+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-14auto merge of #6463 : bjz/rust/numeric-traits, r=thestingerbors-1/+445
This is part of the numeric trait reform tracked on issue #4819
2013-05-14auto merge of #6441 : alexcrichton/rust/issue-5531, r=luqmanabors-76/+77
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude. I'm not quite sure how resolution works with traits, but it seems to me like the public imports at the top-level of the core crate were leaking into the sub-crates, but that could also be working as intended. Regardless, things compile without the re-exports now.
2013-05-14Remove unnecessary infinity checkBrendan Zabarauskas-4/+2
2013-05-14Add ldexp and frexp functionsBrendan Zabarauskas-1/+184
2013-05-13auto merge of #6388 : recrack/rust/each2_mut, r=pcwaltonbors-2/+31
- vec.rs :add 'each2_mut function' - testsuit : run-pass/vec-each2_mut.rs
2013-05-13Remove re-exports from libcore/core.rcAlex Crichton-76/+77
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude.
2013-05-13auto merge of #6387 : brson/rust/unstable, r=brsonbors-380/+388
r? @pcwalton * Move `SharedMutableState`, `LittleLock`, and `Exclusive` from `core::unstable` to `core::unstable::sync` * Modernize the `SharedMutableState` interface with methods * Rename `SharedMutableState` to `UnsafeAtomicRcBox` to match `RcBox`.
2013-05-13auto merge of #6417 : pcwalton/rust/exprs-in-patterns, r=pcwaltonbors-104/+105
r? @graydon
2013-05-13core: Rename SharedMutableState to UnsafeAtomicRcBoxBrian Anderson-90/+88
2013-05-13core: Move locks, atomic rc to unstable::syncBrian Anderson-289/+307
2013-05-13core: Move unstable to unstable/mod.rsBrian Anderson-9/+1
2013-05-14Add inverse hyperbolic functionsBrendan Zabarauskas-0/+263
2013-05-13auto merge of #6437 : Thiez/rust/atomic, r=Aatchbors-0/+10
This pull request adds 4 atomic intrinsics to the compiler, in preparation for #5042. * `atomic_load(src: &int) -> int` performs an atomic sequentially consistent load. * `atomic_load_acq(src: &int) -> int` performs an atomic acquiring load. * `atomic_store(dst: &mut int, val: int)` performs an atomic sequentially consistent store. * `atomic_store_rel(dst: &mut int, val: int)` performs an atomic releasing store. For more information about the whole acquire/release thing: http://llvm.org/docs/Atomics.html r?
2013-05-13TidyMatthijs Hofstra-2/+2
2013-05-13Add vec.rs each2_mut functionYoungmin Yoo-2/+31
2013-05-12libstd: Fix merge fallout.Patrick Walton-6/+10
2013-05-12libsyntax: Tighten up expressions in patterns to only allow identifiers or ↵Patrick Walton-23/+23
literals (possibly with a minus). This had very minimal fallout.
2013-05-12librustc: Make `self` and `static` into keywordsPatrick Walton-61/+63
2013-05-12libsyntax: Remove `extern mod foo { ... }` from the language.Patrick Walton-14/+9
2013-05-12auto merge of #6348 : sstewartgallus/rust/incoming, r=brsonbors-1/+15
In this commit I added a useful utility type, named Void, that encapsulates the doable but annoying job of creating an uninhabited type. As well, a function on that type, named absurd, was created which is useful for ignoring the result of matching on that type. No unit tests were created because it is not possible to create an instance of this type to test the usage of. This type is useful because it is like NonCopyable in that it can be used to create a type with special characteristics without special bloat. For instance, instead of typing pub struct PhantomType { priv contents : () } for each void type one may want to use one can simply type pub struct PhantomType (Void);. This type make such special cases much easier to write.
2013-05-12auto merge of #6439 : bjz/rust/float-classify, r=brsonbors-20/+14
2013-05-13Make Float::classify matching more clear for f64 and f32Brendan Zabarauskas-20/+14
2013-05-12Adds atomic_load, atomic_load_acq, atomic_store, and atomic_store_rel ↵Matthijs Hofstra-0/+10
intrinsics. The default versions (atomic_load and atomic_store) are sequentially consistent. The atomic_load_acq intrinsic acquires as described in [1]. The atomic_store_rel intrinsic releases as described in [1]. [1]: http://llvm.org/docs/Atomics.html
2013-05-12auto merge of #6414 : samebchase/rust/experimental, r=graydonbors-14/+101
Implemented to_str() for HashMap and HashSet Added tests. Minor formatting and stylistic cleanups.
2013-05-12Add use declaration for container::SetSamuel Chase-1/+1
All tests pass now.
2013-05-11auto merge of #6431 : catamorphism/rust/warnings, r=catamorphismbors-31/+16
Just cleaning up warnings.
2013-05-11clean up the last bit of warningsCorey Richardson-3/+0
2013-05-11Warning policeTim Chevalier-28/+16
2013-05-11auto merge of #6426 : gifnksm/rust/new-iter, r=catamorphismbors-7/+20
2013-05-11auto merge of #6420 : huonw/rust/rm-exec, r=thestingerbors-0/+0
2013-05-12libcore: Change `each_val` to follow new for-loop protocolgifnksm-7/+20
2013-05-11auto merge of #6389 : sonwow/rust/issue-3356, r=bstriebors-25/+25
Fix for #3356
2013-05-11Fix errors in test_hashset().Samuel Chase-3/+4
All tests now pass.
2013-05-11Use acc.push_str() instead of str::push_str(..)Samuel Chase-12/+24
Also added some whitespace to enhance readabilty.
2013-05-11Add test: test_hashset()Samuel Chase-0/+14
2013-05-11Add str representation for HashSet.Samuel Chase-0/+18
2013-05-11Remove extra space between key and value.Samuel Chase-6/+9
1. Extra space removed. 2. Using acc.push_str() instead of str::push_str 3. Update test to reflect representation change.
2013-05-11All tests, including newly added test_hashmap() pass. The empty Hash Table ↵Samuel Chase-9/+11
doesn't need to be mutable.
2013-05-11Remove core executableHuon Wilson-0/+0
2013-05-10auto merge of #6260 : alexcrichton/rust/issue-3466-no-swap, r=pcwaltonbors-104/+138
There may be a more efficient implementation of `core::util::swap_ptr`. The issue mentioned using `move_val_init`, but I couldn't figure out what that did, so I just used `copy_memory` a few times instead. I'm not exactly the best at reading LLVM generated by rust, but this does appear to be optimized away just as expected (when possible).
2013-05-10Stop using the '<->' operatorAlex Crichton-99/+75
2013-05-10Implement util::swap without the '<->' operatorAlex Crichton-5/+63
2013-05-10auto merge of #6205 : brson/rust/flate, r=brsonbors-108/+0
r? @graydon I don't think this is necessary in core.
2013-05-10auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwaltonbors-167/+1537
Closes #6183. The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout. The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
2013-05-10test: Use the new `for` protocolAlex Crichton-7/+56
2013-05-10Move flate from core to stdBrian Anderson-108/+0
2013-05-11Removed test_hashmap() for the time, being. All tests pass with make check.Samuel Chase-10/+11
2013-05-11Add to_str() for HashMaps, and some basic tests as well.Samuel Chase-0/+36