bors
77c98f0815
auto merge of #6523 : cmr/rust/faster_each_permutation, r=luqmana
...
Closes #5127
2013-05-16 20:04:41 -07:00
Corey Richardson
af54d58891
Update to new for-loop protocol
2013-05-16 22:57:49 -04:00
Corey Richardson
c67a85ada1
Remove each_permutation_ref
2013-05-16 22:05:05 -04:00
Daniel Micay
08ef229a65
iter: add fold, sum and product
2013-05-16 21:51:31 -04:00
Corey Richardson
c99d1de85b
Update to modern rust
2013-05-16 20:59:06 -04:00
Tommy M. McGuire
5948d8a826
Ensure reverse_part does not access outside given vector
2013-05-16 20:59:06 -04:00
Tommy M. McGuire
2264c7927d
Add reverse_part, replace each_permutation, add tests
2013-05-16 20:59:06 -04:00
bors
92a1f6de97
auto merge of #6509 : thestinger/rust/clone, r=nikomatsakis
...
somewhat annoying to actually call thanks to auto-deref, but it does let `deriving(Clone)` work
2013-05-16 01:07:45 -07:00
bors
92b7a45395
auto merge of #6488 : sammykim/rust/issue-6430, r=sanxiyn
...
Fix issue #6430 .
2013-05-15 22:52:47 -07:00
Sangeun Kim
f097f4309e
Change unsafe functions to safe functions
2013-05-16 13:34:32 +09:00
bors
62caa1e5c8
auto merge of #6505 : cmr/rust/unsetenv, r=catamorphism
2013-05-15 21:31:45 -07:00
bors
f6360b4eab
auto merge of #6527 : thestinger/rust/deep_clone, r=pcwalton
2013-05-15 20:28:45 -07:00
bors
2329651770
auto merge of #6503 : sonwow/rust/at_vec-renamed, r=graydon
...
`str::from_slice` and `vec::from_slice` are changed to `str::to_owned` and `vec::to_owned`. (#6389 )
Replace `at_vec::from_owned` and `at_vec::from_slice` with `at_vec::to_managed_consume` and `at_vec::to_managed`.
2013-05-15 19:22:49 -07:00
Daniel Micay
d6a8343470
add DeepClone impl for @T and @mut T with T: Const
2013-05-15 21:02:54 -04:00
bors
08b4cdd395
auto merge of #6499 : dotdash/rust/static_keywords, r=thestinger
2013-05-15 15:10:48 -07:00
Daniel Micay
22c3db5df7
add a Clone impl for borrowed pointers
2013-05-15 15:58:20 -04:00
bors
8a15333c06
auto merge of #6498 : thestinger/rust/deep_clone, r=thestinger
...
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-15 12:22:58 -07:00
Corey Richardson
6ef226d5d9
Add unsetenv wrapper
2013-05-15 13:40:35 -04:00
bors
bcec83aaee
auto merge of #6493 : brson/rust/tls, r=thestinger
2013-05-15 10:14:04 -07:00
Youngsoo Son
f11297f608
rename at_vec::from_owned and at_vec::from_slice to at_vec::to_managed_consume and at_vec::to_managed
2013-05-16 00:33:54 +09:00
bors
4e82610099
auto merge of #6487 : recrack/rust/vec_len, r=thestinger
...
Rename vec::len(var) to var.len()
```
libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax
test/auxiliary
test/bench
test/run-pass
```
2013-05-15 07:38:07 -07:00
Daniel Micay
cda3ac905a
rc: fix tests
2013-05-15 04:34:31 -04:00
Björn Steinbrink
109bb7c78b
Allow static strings to be used with keyword checks
2013-05-15 08:01:04 +02:00
Daniel Micay
75822f2894
add a DeepClone trait
...
for deep copies through shared ownership boundaries
2013-05-15 01:36:41 -04:00
bors
31cedf6927
auto merge of #6478 : dotdash/rust/inlining, r=catamorphism
...
Not inlining these affects the hash table performance quite badly.
2013-05-14 22:00:01 -07:00
Daniel Micay
fa45958ec8
clone: clarify docstring
2013-05-15 00:42:52 -04:00
Brian Anderson
5af8646a8b
core: Fix leak in TLS. #6231
2013-05-14 20:50:43 -07:00
Youngmin Yoo
a2a8596c3d
Rename vec::len(var) to var.len()
2013-05-15 11:05:28 +09:00
bors
043d02213e
auto merge of #6468 : gifnksm/rust/rposition-immutable, r=brson
...
`position` and `rposition` belonged to `ImmutableCopyableVector`, but they don't need the value is copyable.
2013-05-14 14:05:07 -07:00
Björn Steinbrink
7ba685c7ab
Add inlining for iter_bytes for types used as hashmap keys
...
Not inlining these affects the hash table performance quite badly.
2013-05-14 20:32:49 +02:00
Marvin Löbel
04de8f852c
Fix cosmetics for fail!() calls
2013-05-14 16:36:24 +02:00
Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
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-14 16:36:23 +02:00
gifnksm
4e1fac89bb
Move position and rposition methods to ImmutableVector trait
2013-05-14 18:10:50 +09:00
bors
84745b483f
auto merge of #6463 : bjz/rust/numeric-traits, r=thestinger
...
This is part of the numeric trait reform tracked on issue #4819
2013-05-14 01:55:42 -07:00
bors
5a2f65fb50
auto merge of #6441 : alexcrichton/rust/issue-5531, r=luqmana
...
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-14 00:46:48 -07:00
Brendan Zabarauskas
3515b4996a
Remove unnecessary infinity check
2013-05-14 11:47:44 +10:00
Brendan Zabarauskas
44cb46f7bf
Add ldexp and frexp functions
2013-05-14 11:24:55 +10:00
bors
7d81c80c65
auto merge of #6388 : recrack/rust/each2_mut, r=pcwalton
...
- vec.rs :add 'each2_mut function'
- testsuit : run-pass/vec-each2_mut.rs
2013-05-13 17:40:46 -07:00
Alex Crichton
66e1e51701
Remove re-exports from libcore/core.rc
...
Also fix up all the fallout elsewhere throughout core. It's really nice being
able to have the prelude.
2013-05-13 18:51:40 -04:00
bors
ad5bfd600d
auto merge of #6387 : brson/rust/unstable, r=brson
...
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-13 14:49:48 -07:00
bors
3abc5b3ffb
auto merge of #6417 : pcwalton/rust/exprs-in-patterns, r=pcwalton
...
r? @graydon
2013-05-13 13:25:42 -07:00
Brian Anderson
369231beb4
core: Rename SharedMutableState to UnsafeAtomicRcBox
2013-05-13 12:13:56 -07:00
Brian Anderson
fa1d0477ed
core: Move locks, atomic rc to unstable::sync
2013-05-13 12:13:56 -07:00
Brian Anderson
4f44624415
core: Move unstable to unstable/mod.rs
2013-05-13 12:13:33 -07:00
Brendan Zabarauskas
8d4d2b00c5
Add inverse hyperbolic functions
2013-05-14 00:11:35 +10:00
bors
1bf2f68bb2
auto merge of #6437 : Thiez/rust/atomic, r=Aatch
...
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-13 05:04:41 -07:00
Matthijs Hofstra
852af346d3
Tidy
2013-05-13 13:33:34 +02:00
Youngmin Yoo
943b9d5dd9
Add vec.rs each2_mut function
2013-05-13 13:55:09 +09:00
Patrick Walton
58a37a1f48
libstd: Fix merge fallout.
2013-05-12 17:36:53 -07:00
Patrick Walton
db0693ac8d
libsyntax: Tighten up expressions in patterns to only allow identifiers or literals (possibly with a minus).
...
This had very minimal fallout.
2013-05-12 16:35:19 -07:00