Brian Anderson
a637db2aa1
extra: Add url module
...
Used to be under extra::net, which no longer exists
2013-07-22 14:16:33 -07:00
Brian Anderson
219c1c71da
extra: Remove uv, net, timer code
...
This will all be reimplemented in the new runtime.
2013-07-22 14:16:33 -07:00
blake2-ppc
52b4a2eb6f
dlist: Fix .peek_next() w.r.t double ended iterators
...
.peek_next() needs to check the element counter just like the .next()
and .next_back() iterators do.
Also clarify .insert_next() doc w.r.t double ended iteration.
2013-07-22 17:51:11 +02:00
Daniel Micay
ed67cdb73c
new snapshot
2013-07-22 01:09:48 -04:00
Steven Fackler
8eb6d2d829
Eliminated SmallIntSet
...
SmallIntSet is equivalent to BitvSet but with 8 times the memory
overhead. There's no reason for it to exist.
2013-07-21 19:37:34 -04:00
blake2-ppc
cf437a2730
dlist: Remove extraneous unwrap in .pop_back_node()
2013-07-21 22:37:14 +02:00
blake2-ppc
21adfd5645
dlist: Use Ord for .insert_ordered()
...
We don't need TotalOrd for ordered insertion, just the normal sort order
Ord.
2013-07-21 21:05:48 +02:00
blake2-ppc
b1a071e314
dlist: Remove bench tests for vec
...
These tests for ~[] performance don't really belong here, they were for
comparison.
2013-07-21 21:05:48 +02:00
blake2-ppc
bfa9b43b71
dlist: Add bench test for rotate_to_{front, back}
2013-07-21 21:05:48 +02:00
bors
73e9a121d2
auto merge of #7921 : bytewiseand/rust/smallint-iter, r=huonw
...
Made the `iter` and `mut_iter` methods on SmallIntMap and SmallIntSet return double-ended-iterators. These iterators now implement `size_hint`.
Also the iterator tests only tested dense maps/sets, which aren't very useful. So they were changed to iterate over sparse maps/sets.
Fixes #7721
2013-07-21 11:22:38 -07:00
blake2-ppc
b71c3d250f
dlist: Add .rotate_to_front(), .rotate_to_back()
...
Add methods to move back element to front or front element to back,
without reallocating nodes.
2013-07-21 19:31:40 +02:00
blake2-ppc
78d0cf1409
dlist: Factor out pop and push operations by list node
...
Factor out internal methods for pop/push ~Node<T>, This allows moving
nodes instead of destructuring and allocating new.
Make use of this in .merge() so that it requires no allocations when
merging two DList.
2013-07-21 19:31:40 +02:00
blake2-ppc
5336bdcab1
dlist: Simplify match clauses to use Option methods
...
Make the core Deque implementation a bit simpler by using Option methods
when we simply map on a Some value, and deduplicate some common lines.
2013-07-21 19:31:40 +02:00
blake2-ppc
60cb9c003c
serialize: implement Encodable for DList
...
This impl was missing for unknown reason.
2013-07-21 19:31:40 +02:00
Steven Fackler
fd757a8ab0
Added bitv iterator benchmarks
2013-07-21 03:22:59 -04:00
Steven Fackler
0b4d8d6882
Added iterator tests
2013-07-21 03:22:59 -04:00
Steven Fackler
d6923ddf64
Removed unecessary indirection in Bitv
...
BitvVariant is the same size as it was before (16 bytes).
2013-07-21 03:22:59 -04:00
Steven Fackler
b32a02cdba
Derive Clone for bitv stuff
2013-07-21 03:22:59 -04:00
Steven Fackler
5f208b82e9
Switched bitv to external iterators
2013-07-21 03:22:21 -04:00
bors
c325cb0a42
auto merge of #7912 : graydon/rust/extra-new-benchmarks-1, r=catamorphism
...
This adds new #[bench] benchmarks for extra::smallintmap, treemap, sha1, sha256 and 512, and base64. Also fixes a bunch of warnings in bitv.
2013-07-20 22:10:28 -07:00
bors
8476419fef
auto merge of #7896 : pcwalton/rust/pub-extern, r=pcwalton
...
r? @nikomatsakis
2013-07-20 18:40:39 -07:00
Patrick Walton
06594ed96b
librustc: Remove pub extern
and priv extern
from the language.
...
Place `pub` or `priv` on individual items instead.
2013-07-20 17:39:38 -07:00
bors
75b4b1b027
auto merge of #7882 : blake2-ppc/rust/iterator-clone, r=thestinger
...
Implement method .cycle() that repeats an iterator endlessly
Implement Clone for simple iterators (without closures), including VecIterator.
> The theory is simple, the immutable iterators simply hold state
> variables (indicies or pointers) into frozen containers. We can freely
> clone these iterators, just like we can clone borrowed pointers.
2013-07-20 16:58:30 -07:00
blake2-ppc
fe134b9509
dlist: Implement Clone for immutable iterators
2013-07-20 20:30:58 +02:00
bors
5c999d4eca
auto merge of #7894 : pcwalton/rust/and-pointers-in-at-boxes, r=brson
...
r? @brson
2013-07-20 10:55:34 -07:00
blake2-ppc
980646a450
Use Option .take() or .take_unwrap() instead of util::replace where possible
2013-07-20 05:12:05 -04:00
Ben Blum
621bc79d0d
Fix warnings in stdtest and extratest. Maybe somebody will care.
2013-07-20 05:12:05 -04:00
Ben Blum
10a400ffaa
Reimplement ARC::unwrap() and friends.
2013-07-20 05:08:55 -04:00
Matthijs Hofstra
eb74f0ccf6
Added a new method to extra::future (unwrap) + a test
2013-07-19 21:04:33 -04:00
Andreas Martens
51649b763e
smallint{map,set}: replace iterators with DoubleEndedIterator
...
Also changed the tests to iterate over sparse maps/sets.
2013-07-20 02:29:54 +02:00
Graydon Hoare
0ba6a51f32
extra: add some microbenchmarks
2013-07-19 15:08:42 -07:00
bors
3514a5af06
auto merge of #7857 : blake2-ppc/rust/fix-test-warnings, r=alexcrichton
...
Fix warnings that only show up when compiling the tests for libstd, libextra and one in librusti. Only trivial changes.
2013-07-18 20:55:38 -07:00
Patrick Walton
9089cf2ec9
librustc: Forbid &
pointers (other than &'static
) inside @
boxes.
...
This makes custom borrowing implementations for custom smart pointers
sound.
2013-07-18 17:12:46 -07:00
bors
f83c118f42
auto merge of #7833 : blake2-ppc/rust/hashmap-consume, r=alexcrichton
...
Updated all users of HashMap, HashSet ::consume() to use
.consume_iter().
Since .consume_iter() takes the map or set by value, it needs awkward
extra code to in librusti's use of @mut HashMap, where the map value can
not be directly moved out.
Addresses issue #7719
2013-07-18 10:19:44 -07:00
bors
babf741177
auto merge of #7840 : alexcrichton/rust/better-test-help, r=huonw
...
Progress on #7824 , closes #7825
2013-07-18 06:52:41 -07:00
blake2-ppc
7ef9e722b8
hashmap: Remove .consume() has rename .consume_iter() to .consume()
...
Updated all users of HashMap, HashSet old .consume() to use .consume()
with a for loop.
Since .consume() takes the map or set by value, it needs awkward
extra code to in librusti's use of @mut HashMap, where the map value can
not be directly moved out.
2013-07-18 15:03:59 +02:00
blake2-ppc
e93dd34cd3
Fix warnings in libextra tests
...
Most of these are "unneccesary allocation" in bitv, for ~[false, ..] instead
of [false, ..].
2013-07-18 02:18:53 +02:00
Patrick Walton
3d13d4b58d
libextra: Add a stray deriving or two.
2013-07-17 15:15:34 -07:00
Patrick Walton
66a9b7d5bd
libsyntax: Remove some multi-gigabyte clones that were preventing bootstrapping on Windows.
2013-07-17 14:57:56 -07:00
Patrick Walton
dc4bf173f8
test: Fix tests.
2013-07-17 14:57:55 -07:00
Patrick Walton
88fe4ae09c
librustc: Remove the Copy
bound from the language.
2013-07-17 14:57:54 -07:00
Patrick Walton
d57e8f8419
librustc: Change repeated vector expressions to use implicit copyability.
2013-07-17 14:57:54 -07:00
Patrick Walton
2dbb3c3887
test: Fix tests.
2013-07-17 14:57:54 -07:00
Patrick Walton
e20549ff19
librustc: Remove all uses of the Copy
bound.
2013-07-17 14:57:53 -07:00
Patrick Walton
99b33f7219
librustc: Remove all uses of "copy".
2013-07-17 14:57:51 -07:00
Patrick Walton
b4e674f6e6
librustc: Add a lint mode for unnecessary copy
and remove a bunch of them.
2013-07-17 14:56:42 -07:00
bors
8c082658be
auto merge of #7829 : graydon/rust/codegen-compiletests, r=cmr
...
This should get us over the hump of activating basic ratcheting on codegen tests, at least. It also puts in place optional (disabled by default) ratcheting on all #[bench] tests, and records all metrics from them to harvestable .json files in any case.
2013-07-17 13:07:24 -07:00
Graydon Hoare
6d78a367b1
extra: avoid possible divide-by-zero conditions test.
2013-07-17 12:28:48 -07:00
bors
4bd716ac8e
auto merge of #7831 : ozten/rust/issues-7764-swap_unwarp-take-unwrap, r=pcwalton
...
Fixes Issue #7764
Running `make check` I do get a failure:
test rt::io::extensions::test::push_bytes ... ok
rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition:
read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}',
/Users/shout/Projects/rust/src/libstd/condition.rs:50
/bin/sh: line 1: 35056 Abort trap: 6 x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile
tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log
make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
2013-07-16 21:31:48 -07:00
Alex Crichton
d5f53c780e
Provide more useful messages when tests are given -h or --help
...
Progress on #7824
2013-07-16 20:08:01 -07:00