about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2013-08-09Implement `lower_bound_iter`/`upper_bound_iter` for TrieMap/TrieSetDmitry Ermolov-0/+102
2013-08-09auto merge of #8357 : omasanori/rust/cleanup, r=alexcrichtonbors-57/+3
I feel it's time to eliminate them (and add some testcases.)
2013-08-09Remove redundant Ord method impls.OGINO Masanori-57/+3
Basically, generic containers should not use the default methods since a type of elements may not guarantees total order. str could use them since u8's Ord guarantees total order. Floating point numbers are also broken with the default methods because of NaN. Thanks for @thestinger. Timespec also guarantees total order AIUI. I'm unsure whether extra::semver::Identifier does so I left it alone. Proof needed. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-08auto merge of #8350 : dim-an/rust/fix-struct-match, r=pcwaltonbors-65/+158
Code that collects fields in struct-like patterns used to ignore wildcard patterns like `Foo{_}`. But `enter_defaults` considered struct-like patterns as default in order to overcome this (accoring to my understanding of situation). However such behaviour caused code like this: ``` enum E { Foo{f: int}, Bar } let e = Bar; match e { Foo{f: _f} => { /* do something (1) */ } _ => { /* do something (2) */ } } ``` consider pattern `Foo{f: _f}` as default. That caused inproper behaviour and even segfaults while trying to destruct `Bar` as `Foo{f: _f}`. Issues: #5625 , #5530. This patch fixes `collect_record_or_struct_fields` to split cases of single wildcard struct-like pattern and no struct-like pattern at all. Former case resolved with `enter_rec_or_struct` (and not with `enter_defaults`). Closes #5625. Closes #5530.
2013-08-08auto merge of #8336 : stepancheg/rust/socket-addr-from-str, r=brsonbors-70/+367
FromStr implemented from scratch. It is overengineered a bit, however. Old implementation handles errors by fail!()-ing. And it has bugs, like it accepts `127.0.0.1::127.0.0.1` as IPv6 address, and does not handle all ipv4-in-ipv6 schemes. So I decided to implement parser from scratch.
2013-08-08auto merge of #8356 : toddaaro/rust/ws, r=brsonbors-63/+328
This pull request converts the scheduler from a naive shared queue scheduler to a naive workstealing scheduler. The deque is still a queue inside a lock, but there is still a substantial performance gain. Fiddling with the messaging benchmark I got a ~10x speedup and observed massively reduced memory usage. There are still *many* locations for optimization, but based on my experience so far it is a clear performance win as it is now.
2013-08-08auto merge of #8385 : cmr/rust/big-rollup, r=alexcrichtonbors-552/+718
This is a fairly large rollup, but I've tested everything locally, and none of it should be platform-specific. r=alexcrichton (bdfdbdd) r=brson (d803c18) r=alexcrichton (a5041d0) r=bstrie (317412a) r=alexcrichton (135c85e) r=thestinger (8805baa) r=pcwalton (0661178) r=cmr (9397fe0) r=cmr (caa4135) r=cmr (6a21d93) r=cmr (4dc3379) r=cmr (0aa5154) r=cmr (18be261) r=thestinger (f10be03)
2013-08-08Enabled workstealing in the scheduler. Previously we had one global work ↵toddaaro-63/+328
queue shared by each scheduler. Now there is a separate work queue for each scheduler, and work is "stolen" from other queues when it is exhausted locally.
2013-08-08Fix more priv falloutCorey Richardson-3/+3
2013-08-08xfail-fast an aux testCorey Richardson-1/+1
2013-08-08auto merge of #8245 : alexcrichton/rust/fmt2, r=graydonbors-3/+2258
This is a reopening of #8182, although this removes any abuse of the compiler internals. Now it's just a pure syntax extension (hard coded what the attribute names are).
2013-08-07Fix falloutCorey Richardson-8/+8
2013-08-07(cleanup) Improve rtabort message for atomic-sleep.Ben Blum-1/+2
2013-08-07fix recv_ready for Port to take &self and not need to return a tuple. Close ↵Ben Blum-7/+26
#8192.
2013-08-07extra: Remove all each_* methods in treemapblake2-ppc-39/+6
.each_key(), .each_value() and the other methods are replaced by .iter() and .rev_iter(), and restrictions of those iterators.
2013-08-07extra: Implement .rev_iter() in treemapblake2-ppc-21/+60
Implement reverse iterators for TreeMap and TreeSet, that produce the keys in backward order.
2013-08-07extra: External iterators for TreeSet set operationsblake2-ppc-114/+134
Write external iterators for Difference, Sym. Difference, Intersection and Union set operations. These iterators are generic insofar that they could work on any ordered sequence iterators, even though they are type specialized to the TreeSetIterator in this case. Looking at the `check` function in the treeset tests, rustc seems unwilling to compile a function resembling:: fn check<'a, T: Iterator<&'a int>>(... ) so the tests for these iterators are still running the legacy loop protocol.
2013-08-07extra: Simplify Eq/Ord in treemapblake2-ppc-21/+5
Write the Eq and Ord impls for TreeMap in a more straightforward way using iterator::Zip
2013-08-07Gedit/gtksourceview language spec: add 'in' keywordSimon Sapin-0/+1
2013-08-07std: add missing #[inline] annotation to the f64 arithmetic trait impls.Huon Wilson-0/+4
2013-08-07misc help message fixDo Nhat Minh-3/+3
2013-08-07Add weak_rng to get a random algo that puts more emphasis on speed than securityJordi Boggiano-0/+10
2013-08-07Document rand module with more emphasis on cryptographic securityJordi Boggiano-2/+12
2013-08-07Change const to staticSangeun Kim-43/+43
2013-08-07Change Freeze to StaticSangeun Kim-3/+3
2013-08-07Fix unit structs in cross-crate situtationsAlex Crichton-2/+92
2013-08-07extra: add `internal` to {de,in}flate_bytes_ naming to address nitdarkf-6/+6
2013-08-07add extra::flate::deflate_bytes_zlib and a testdarkf-2/+19
2013-08-07add inflate_bytes_zlib to exra::flatedarkf-2/+11
2013-08-07Turn OptGroups into a main opt and a main and an aliased optsJordi Boggiano-35/+72
This way opt_present("apple") will match no matter if the user passed -a or --apple
2013-08-07Add missing getopts::groups::optflagmulti functionJordi Boggiano-0/+14
2013-08-07Forbid `priv` where it has no effectAlex Crichton-64/+81
This is everywhere except struct fields and enum variants.
2013-08-07Implement DoubleEndedIterator on RangeKevin Ballard-65/+56
Range is now invertable as long as its element type conforms to Integer. Remove int::range_rev() et al in favor of range().invert().
2013-08-07rustc: Fix for-range loops that can use iteratorsblake2-ppc-29/+21
Transform range loops that can be regular iterator loops.
2013-08-07Bugfix .each_edge in middle/graph.rsblake2-ppc-3/+3
Edge iterator used the length of the nodes vector, must be a mistake.
2013-08-07std: Fix for-range loops that can use iteratorsblake2-ppc-44/+31
Fix inappropriate for-range loops to use for-iterator constructs (or other appropriate solution) instead.
2013-08-07extra: Remove all .each methods in smallintmapblake2-ppc-43/+0
2013-08-07Add initial support for a new formatting syntaxAlex Crichton-3/+2258
The new macro is available under the name ifmt! (only an intermediate name)
2013-08-07auto merge of #8358 : brson/rust/newrt, r=brsonbors-54/+173
2013-08-07Turn on the new runtimeBrian Anderson-1/+1
2013-08-07rusti: Disable testsBrian Anderson-0/+15
Segfaulted on one of the bots. Maybe out of stack?
2013-08-07Disable linked failure testsBrian Anderson-0/+40
The implementation currently contains a race that leads to segfaults.
2013-08-07xfail debug-info/option-like-enumBrian Anderson-0/+1
Don't understand why this broke.
2013-08-07test: Fix deadlock in task-perf-linked-failureBrian Anderson-1/+4
2013-08-07test: xfail a bunch of tests that are incorrectly reading os::args()[1]Brian Anderson-0/+10
2013-08-07rustpkg: Disable test_uninstallBrian Anderson-0/+1
Seems to not work
2013-08-07rustc: Use 4MB stacks. Needed for unoptimized builds apparently.Brian Anderson-1/+9
2013-08-07std: Allow spawners to specify stack sizeBrian Anderson-49/+61
2013-08-07std::rt: Pull RUST_MIN_STACK from the environmentBrian Anderson-3/+32
2013-08-07std::rt: 2MB stacks againBrian Anderson-1/+1