Kevin Ballard
24a62e176a
Tweak error reporting in io::net::tcp tests
...
Errors can be printed with {}, printing with {:?} does not work very
well.
Not actually related to this PR, but it came up when running the tests
and now is as good a time to fix it as any.
2014-07-31 13:14:06 -07:00
Kevin Ballard
4b74dc167c
Rewrite the local_data implementation
...
This was motivated by a desire to remove allocation in the common
pattern of
let old = key.replace(None)
do_something();
key.replace(old);
This also switched the map representation from a Vec to a TreeMap. A Vec
may be reasonable if there's only a couple TLD keys, but a TreeMap
provides better behavior as the number of keys increases.
Like the Vec, this TreeMap implementation does not shrink the container
when a value is removed. Unlike Vec, this TreeMap implementation cannot
reuse an empty node for a different key. Therefore any key that has been
inserted into the TLD at least once will continue to take up space in
the Map until the task ends. The expectation is that the majority of
keys that are inserted into TLD will be expected to have a value for
most of the rest of the task's lifetime. If this assumption is wrong,
there are two reasonable ways to fix this that could be implemented in
the future:
1. Provide an API call to either remove a specific key from the TLD and
destruct its node (e.g. `remove()`), or instead to explicitly clean
up all currently-empty nodes in the map (e.g. `compact()`). This is
simple, but requires the user to explicitly call it.
2. Keep track of the number of empty nodes in the map and when the map
is mutated (via `replace()`), if the number of empty nodes passes
some threshold, compact it automatically. Alternatively, whenever a
new key is inserted that hasn't been used before, compact the map at
that point.
---
Benchmarks:
I ran 3 benchmarks. tld_replace_none just replaces the tld key with None
repeatedly. tld_replace_some replaces it with Some repeatedly. And
tld_replace_none_some simulates the common behavior of replacing with
None, then replacing with the previous value again (which was a Some).
Old implementation:
test tld_replace_none ... bench: 20 ns/iter (+/- 0)
test tld_replace_none_some ... bench: 77 ns/iter (+/- 4)
test tld_replace_some ... bench: 57 ns/iter (+/- 2)
New implementation:
test tld_replace_none ... bench: 11 ns/iter (+/- 0)
test tld_replace_none_some ... bench: 23 ns/iter (+/- 0)
test tld_replace_some ... bench: 12 ns/iter (+/- 0)
2014-07-31 13:14:03 -07:00
Kevin Ballard
3db5cf6f1d
Update docs for TLS -> TLD
...
The correct terminology is Task-Local Data, or TLD. Task-Local Storage,
or TLS, is the old terminology that was abandoned because of the
confusion with Thread-Local Storage (TLS).
2014-07-30 10:36:45 -07:00
bors
5ebf4813a6
auto merge of #15956 : steveklabnik/rust/guide_crates, r=pcwalton
...
Also fixes a couple of filesystem references that I forgot to change. 😅
2014-07-29 21:16:50 +00:00
bors
87c78fd7e3
auto merge of #16046 : dotdash/rust/call_ignore_alloca, r=pcwalton
2014-07-29 19:31:44 +00:00
bors
6635fe7db4
auto merge of #15989 : pcwalton/rust/borrowck-pattern-guards, r=pnkfelix
...
the CFG for match statements.
There were two bugs in issue #14684 . One was simply that the borrow
check didn't know about the correct CFG for match statements: the
pattern must be a predecessor of the guard. This disallows the bad
behavior if there are bindings in the pattern. But it isn't enough to
prevent the memory safety problem, because of wildcards; thus, this
patch introduces a more restrictive rule, which disallows assignments
and mutable borrows inside guards outright.
I discussed this with Niko and we decided this was the best plan of
action.
This breaks code that performs mutable borrows in pattern guards. Most
commonly, the code looks like this:
impl Foo {
fn f(&mut self, ...) {}
fn g(&mut self, ...) {
match bar {
Baz if self.f(...) => { ... }
_ => { ... }
}
}
}
Change this code to not use a guard. For example:
impl Foo {
fn f(&mut self, ...) {}
fn g(&mut self, ...) {
match bar {
Baz => {
if self.f(...) {
...
} else {
...
}
}
_ => { ... }
}
}
}
Sometimes this can result in code duplication, but often it illustrates
a hidden memory safety problem.
Closes #14684 .
[breaking-change]
r? @pnkfelix
2014-07-29 17:41:41 +00:00
Steve Klabnik
456c4494b8
New Guide: crates and modules
2014-07-29 12:50:25 -04:00
bors
b92536ff2f
auto merge of #16054 : tshepang/rust/patch-1, r=brson
2014-07-29 15:57:01 +00:00
bors
1c0493919f
auto merge of #16052 : nham/rust/fs_docs, r=brson
...
Some of the fixes include:
- fixing mismatch between the documentation and the function parameters. (i.e. documentation references `path` parameter, but it's actually called `from`, or vice versa)
- A few Error sections were missing an "if" on the middle clause. For example, they used to be: "This function will return an error if [Thing], [Another Thing], or if [Yet Another Thing]." I added an "if" so it becomes "This function will return an error if [Thing], if [Another Thing], or if [Yet Another Thing]"
- The error sections previously started off with 3 different phrases:
- "This function will return an error if ..."
- "Will return an error if ..."
- "This call will return an error if ..."
I've standardized on the first phrase.
2014-07-29 14:11:37 +00:00
bors
72e2c7dec3
auto merge of #16050 : jxs/rust/master, r=alexcrichton
...
getopts returns Matches not Opt
2014-07-29 12:26:38 +00:00
bors
1ec6d17f23
auto merge of #16049 : aturon/rust/stability-dashboard-improvements, r=alexcrichton
...
* Makes dashboard width dynamic.
* Colors unmarked items.
* Gives overall crate percentages.
2014-07-29 10:41:41 +00:00
bors
7375f4d842
auto merge of #16038 : nham/rust/collections_partialord, r=alexcrichton
...
cc #15294
2014-07-29 07:56:41 +00:00
bors
23466b04f9
auto merge of #16034 : sfackler/rust/test-reexport-fix, r=alexcrichton
...
We previously reexported entire modules, which caused private things to
become reachable and trip the dead code and private items in public API
lints.
Closes #15912
2014-07-29 06:11:41 +00:00
bors
f653d9f9bf
auto merge of #16033 : nham/rust/hash_tuple_impl, r=alexcrichton
...
Previously the implementation of Hash was limited to tuples of up to arity 8. This increases it to tuples of up to arity 12.
Also, the implementation macro for `Hash` used to expand to something like this:
impl Hash for (a7,)
impl Hash for (a6, a7)
impl Hash for (a5, a6, a7)
...
This style is inconsistent with the implementations in core::tuple, which look like this:
impl Trait for (A,)
impl Trait for (A, B)
impl Trait for (A, B, C)
...
This is perhaps a minor point, but it does mean the documentation pages are inconsistent. Compare the tuple implementations in the documentation for [Hash](http://static.rust-lang.org/doc/master/std/hash/trait.Hash.html ) and [PartialOrd](http://static.rust-lang.org/doc/master/core/cmp/trait.PartialOrd.html )
This changes the Hash implementation to be consistent with `core::tuple`.
2014-07-29 04:26:42 +00:00
bors
9e250109f9
auto merge of #16032 : treeman/rust/doc-treecollection, r=alexcrichton
2014-07-29 02:41:41 +00:00
bors
b2bd998607
auto merge of #16027 : treeman/rust/doc-string, r=alexcrichton
2014-07-28 22:36:39 +00:00
Tshepang Lekhonkhobe
886c501ca3
doc: reduce overlong sentence
2014-07-28 23:22:47 +02:00
bors
279a780804
auto merge of #15983 : brson/rust/fail, r=alexcrichton
...
A few refactorings to decrease text size and increase data size. I'm not sure about this tradeoff. Various stats below. cc @pcwalton
This reduces the code needed to pass arguments for `fail!()`, `fail!("{}", ...)`, and to a lesser extent `fail!("...")`. Still more work to be done on compiler-generated failures and the `fail!("...")` case.
do_fail_empty:
```
#[inline(never)]
fn do_fail_empty() {
fail!()
}
```
do_fail_empty before:
```
leaq 8(%rsp), %rdi
movabsq $13, %rsi
leaq "str\"str\"(1494)"(%rip), %rax
movq %rax, 8(%rsp)
movq $19, 16(%rsp)
callq _ZN6unwind31begin_unwind_no_time_to_explain20h57030457935ab6111SdE@PLT
```
do_fail_empty after:
```
leaq _ZN13do_fail_empty9file_line20h339df6a0541e837eIaaE(%rip), %rdi
callq _ZN6unwind31begin_unwind_no_time_to_explain20h33184cfdcce4dfd8QTdE@PLT
```
do_fail_fmt:
```
#[inline(never)]
fn do_fail_fmt() {
fail!("guh{}", "faw")
}
```
do_fail_fmt before:
```
... (snip lots of fmt stuff)
callq _ZN3fmt22Arguments$LT$$x27a$GT$3new20he09b3a3f473879c41paE
leaq 144(%rsp), %rsi
movabsq $23, %rdx
leaq "str\"str\"(1494)"(%rip), %rax
leaq 32(%rsp), %rcx
movq %rcx, 160(%rsp)
movq 160(%rsp), %rdi
movq %rax, 144(%rsp)
movq $19, 152(%rsp)
callq _ZN6unwind16begin_unwind_fmt20h3ebeb42f4d189b2buQdE@PLT
```
do_fail_fmt after:
```
... (snip lots of fmt stuff)
callq _ZN3fmt22Arguments$LT$$x27a$GT$3new20h42e5bb8d1711ee61OqaE
leaq _ZN11do_fail_fmt7run_fmt9file_line20h339df6a0541e837eFbaE(%rip), %rsi
leaq 32(%rsp), %rax
movq %rax, 144(%rsp)
movq 144(%rsp), %rdi
callq _ZN6unwind16begin_unwind_fmt20hfdcadc14d188656biRdE@PLT
```
File size increases.
file size before:
```
-rw-rw-r-- 1 brian brian 100501740 Jul 24 23:28 /home/brian/dev/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-4e7c5e5c.rlib
-rwxrwxr-x 1 brian brian 21201780 Jul 24 23:27 /home/brian/dev/rust2/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-4e7c5e5c.so
```
file size after:
```
-rw-rw-r-- 1 brian brian 101542484 Jul 25 00:34 x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-4e7c5e5c.rlib
-rwxrwxr-x 1 brian brian 21348862 Jul 25 00:34 x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-4e7c5e5c.so
```
Text size decreases by 52486 while data size increases by 143686.
section size before:
```
text data bss dec hex filename
12712262 5924997 368 18637627 11c633b x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-4e7c5e5c.so
```
section size after:
```
text data bss dec hex filename
12659776 6068683 368 18728827 11dc77b /home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-4e7c5e5c.so
```
I don't know if anything can be learned from these benchmarks. Looks like a wash.
std bench before:
```
test collections::hashmap::bench::find_existing ... bench: 43452 ns/iter (+/- 2423)
test collections::hashmap::bench::find_nonexisting ... bench: 42416 ns/iter (+/- 3996)
test collections::hashmap::bench::find_pop_insert ... bench: 214 ns/iter (+/- 11)
test collections::hashmap::bench::hashmap_as_queue ... bench: 123 ns/iter (+/- 6)
test collections::hashmap::bench::insert ... bench: 153 ns/iter (+/- 14)
test collections::hashmap::bench::new_drop ... bench: 547 ns/iter (+/- 259)
test collections::hashmap::bench::new_insert_drop ... bench: 682 ns/iter (+/- 366)
test io::buffered::test::bench_buffered_reader ... bench: 1046 ns/iter (+/- 86)
test io::buffered::test::bench_buffered_stream ... bench: 2156 ns/iter (+/- 801)
test io::buffered::test::bench_buffered_writer ... bench: 1057 ns/iter (+/- 75)
test io::extensions::bench::u64_from_be_bytes_4_aligned ... bench: 80 ns/iter (+/- 5)
test io::extensions::bench::u64_from_be_bytes_4_unaligned ... bench: 81 ns/iter (+/- 6)
test io::extensions::bench::u64_from_be_bytes_7_aligned ... bench: 80 ns/iter (+/- 4)
test io::extensions::bench::u64_from_be_bytes_7_unaligned ... bench: 69 ns/iter (+/- 4)
test io::extensions::bench::u64_from_be_bytes_8_aligned ... bench: 69 ns/iter (+/- 3)
test io::extensions::bench::u64_from_be_bytes_8_unaligned ... bench: 81 ns/iter (+/- 4)
test io::mem::test::bench_buf_reader ... bench: 628 ns/iter (+/- 18)
test io::mem::test::bench_buf_writer ... bench: 478 ns/iter (+/- 19)
test io::mem::test::bench_mem_reader ... bench: 712 ns/iter (+/- 44)
test io::mem::test::bench_mem_writer_001_0000 ... bench: 31 ns/iter (+/- 1)
test io::mem::test::bench_mem_writer_001_0010 ... bench: 51 ns/iter (+/- 3)
test io::mem::test::bench_mem_writer_001_0100 ... bench: 121 ns/iter (+/- 8)
test io::mem::test::bench_mem_writer_001_1000 ... bench: 774 ns/iter (+/- 47)
test io::mem::test::bench_mem_writer_100_0000 ... bench: 756 ns/iter (+/- 50)
test io::mem::test::bench_mem_writer_100_0010 ... bench: 2726 ns/iter (+/- 198)
test io::mem::test::bench_mem_writer_100_0100 ... bench: 8961 ns/iter (+/- 712)
test io::mem::test::bench_mem_writer_100_1000 ... bench: 105673 ns/iter (+/- 24711)
test num::bench::bench_pow_function ... bench: 5849 ns/iter (+/- 371)
test num::strconv::bench::f64::float_to_string ... bench: 662 ns/iter (+/- 202)
test num::strconv::bench::int::to_str_base_36 ... bench: 424 ns/iter (+/- 7)
test num::strconv::bench::int::to_str_bin ... bench: 1227 ns/iter (+/- 80)
test num::strconv::bench::int::to_str_dec ... bench: 466 ns/iter (+/- 13)
test num::strconv::bench::int::to_str_hex ... bench: 498 ns/iter (+/- 22)
test num::strconv::bench::int::to_str_oct ... bench: 502 ns/iter (+/- 229)
test num::strconv::bench::uint::to_str_base_36 ... bench: 375 ns/iter (+/- 7)
test num::strconv::bench::uint::to_str_bin ... bench: 1011 ns/iter (+/- 590)
test num::strconv::bench::uint::to_str_dec ... bench: 407 ns/iter (+/- 17)
test num::strconv::bench::uint::to_str_hex ... bench: 442 ns/iter (+/- 7)
test num::strconv::bench::uint::to_str_oct ... bench: 433 ns/iter (+/- 46)
test path::posix::bench::ends_with_path_home_dir ... bench: 167 ns/iter (+/- 10)
test path::posix::bench::ends_with_path_missmatch_jome_home ... bench: 148 ns/iter (+/- 6)
test path::posix::bench::is_ancestor_of_path_with_10_dirs ... bench: 221 ns/iter (+/- 31)
test path::posix::bench::join_abs_path_home_dir ... bench: 144 ns/iter (+/- 23)
test path::posix::bench::join_home_dir ... bench: 196 ns/iter (+/- 9)
test path::posix::bench::join_many_abs_path_home_dir ... bench: 143 ns/iter (+/- 6)
test path::posix::bench::join_many_home_dir ... bench: 195 ns/iter (+/- 8)
test path::posix::bench::path_relative_from_backward ... bench: 248 ns/iter (+/- 10)
test path::posix::bench::path_relative_from_forward ... bench: 241 ns/iter (+/- 13)
test path::posix::bench::path_relative_from_same_level ... bench: 296 ns/iter (+/- 11)
test path::posix::bench::push_abs_path_home_dir ... bench: 104 ns/iter (+/- 7)
test path::posix::bench::push_home_dir ... bench: 27311 ns/iter (+/- 2727)
test path::posix::bench::push_many_abs_path_home_dir ... bench: 109 ns/iter (+/- 5)
test path::posix::bench::push_many_home_dir ... bench: 23263 ns/iter (+/- 1726)
test rand::bench::rand_isaac ... bench: 884 ns/iter (+/- 31) = 904 MB/s
test rand::bench::rand_isaac64 ... bench: 440 ns/iter (+/- 126) = 1818 MB/s
test rand::bench::rand_shuffle_100 ... bench: 2518 ns/iter (+/- 1371)
test rand::bench::rand_std ... bench: 429 ns/iter (+/- 17) = 1864 MB/s
test rand::bench::rand_xorshift ... bench: 0 ns/iter (+/- 0) = 800000 MB/s
```
std bench after:
```
test collections::hashmap::bench::find_existing ... bench: 43635 ns/iter (+/- 4508)
test collections::hashmap::bench::find_nonexisting ... bench: 42323 ns/iter (+/- 1753)
test collections::hashmap::bench::find_pop_insert ... bench: 216 ns/iter (+/- 11)
test collections::hashmap::bench::hashmap_as_queue ... bench: 125 ns/iter (+/- 8)
test collections::hashmap::bench::insert ... bench: 153 ns/iter (+/- 63)
test collections::hashmap::bench::new_drop ... bench: 517 ns/iter (+/- 282)
test collections::hashmap::bench::new_insert_drop ... bench: 734 ns/iter (+/- 264)
test io::buffered::test::bench_buffered_reader ... bench: 1063 ns/iter (+/- 206)
test io::buffered::test::bench_buffered_stream ... bench: 2321 ns/iter (+/- 2302)
test io::buffered::test::bench_buffered_writer ... bench: 1060 ns/iter (+/- 24)
test io::extensions::bench::u64_from_be_bytes_4_aligned ... bench: 69 ns/iter (+/- 2)
test io::extensions::bench::u64_from_be_bytes_4_unaligned ... bench: 81 ns/iter (+/- 7)
test io::extensions::bench::u64_from_be_bytes_7_aligned ... bench: 70 ns/iter (+/- 5)
test io::extensions::bench::u64_from_be_bytes_7_unaligned ... bench: 69 ns/iter (+/- 5)
test io::extensions::bench::u64_from_be_bytes_8_aligned ... bench: 80 ns/iter (+/- 6)
test io::extensions::bench::u64_from_be_bytes_8_unaligned ... bench: 81 ns/iter (+/- 5)
test io::mem::test::bench_buf_reader ... bench: 663 ns/iter (+/- 44)
test io::mem::test::bench_buf_writer ... bench: 489 ns/iter (+/- 17)
test io::mem::test::bench_mem_reader ... bench: 700 ns/iter (+/- 23)
test io::mem::test::bench_mem_writer_001_0000 ... bench: 31 ns/iter (+/- 3)
test io::mem::test::bench_mem_writer_001_0010 ... bench: 49 ns/iter (+/- 5)
test io::mem::test::bench_mem_writer_001_0100 ... bench: 112 ns/iter (+/- 6)
test io::mem::test::bench_mem_writer_001_1000 ... bench: 765 ns/iter (+/- 59)
test io::mem::test::bench_mem_writer_100_0000 ... bench: 727 ns/iter (+/- 54)
test io::mem::test::bench_mem_writer_100_0010 ... bench: 2586 ns/iter (+/- 215)
test io::mem::test::bench_mem_writer_100_0100 ... bench: 8846 ns/iter (+/- 439)
test io::mem::test::bench_mem_writer_100_1000 ... bench: 105747 ns/iter (+/- 17443)
test num::bench::bench_pow_function ... bench: 5844 ns/iter (+/- 421)
test num::strconv::bench::f64::float_to_string ... bench: 669 ns/iter (+/- 571)
test num::strconv::bench::int::to_str_base_36 ... bench: 417 ns/iter (+/- 24)
test num::strconv::bench::int::to_str_bin ... bench: 1216 ns/iter (+/- 36)
test num::strconv::bench::int::to_str_dec ... bench: 466 ns/iter (+/- 24)
test num::strconv::bench::int::to_str_hex ... bench: 492 ns/iter (+/- 8)
test num::strconv::bench::int::to_str_oct ... bench: 496 ns/iter (+/- 295)
test num::strconv::bench::uint::to_str_base_36 ... bench: 366 ns/iter (+/- 8)
test num::strconv::bench::uint::to_str_bin ... bench: 1005 ns/iter (+/- 69)
test num::strconv::bench::uint::to_str_dec ... bench: 396 ns/iter (+/- 20)
test num::strconv::bench::uint::to_str_hex ... bench: 435 ns/iter (+/- 4)
test num::strconv::bench::uint::to_str_oct ... bench: 436 ns/iter (+/- 451)
test path::posix::bench::ends_with_path_home_dir ... bench: 171 ns/iter (+/- 6)
test path::posix::bench::ends_with_path_missmatch_jome_home ... bench: 152 ns/iter (+/- 6)
test path::posix::bench::is_ancestor_of_path_with_10_dirs ... bench: 215 ns/iter (+/- 8)
test path::posix::bench::join_abs_path_home_dir ... bench: 143 ns/iter (+/- 6)
test path::posix::bench::join_home_dir ... bench: 192 ns/iter (+/- 29)
test path::posix::bench::join_many_abs_path_home_dir ... bench: 144 ns/iter (+/- 9)
test path::posix::bench::join_many_home_dir ... bench: 194 ns/iter (+/- 19)
test path::posix::bench::path_relative_from_backward ... bench: 254 ns/iter (+/- 15)
test path::posix::bench::path_relative_from_forward ... bench: 244 ns/iter (+/- 17)
test path::posix::bench::path_relative_from_same_level ... bench: 293 ns/iter (+/- 27)
test path::posix::bench::push_abs_path_home_dir ... bench: 108 ns/iter (+/- 5)
test path::posix::bench::push_home_dir ... bench: 32292 ns/iter (+/- 4361)
test path::posix::bench::push_many_abs_path_home_dir ... bench: 108 ns/iter (+/- 6)
test path::posix::bench::push_many_home_dir ... bench: 20305 ns/iter (+/- 1331)
test rand::bench::rand_isaac ... bench: 888 ns/iter (+/- 35) = 900 MB/s
test rand::bench::rand_isaac64 ... bench: 439 ns/iter (+/- 17) = 1822 MB/s
test rand::bench::rand_shuffle_100 ... bench: 2582 ns/iter (+/- 1001)
test rand::bench::rand_std ... bench: 431 ns/iter (+/- 93) = 1856 MB/s
test rand::bench::rand_xorshift ... bench: 0 ns/iter (+/- 0) = 800000 MB/s
```
2014-07-28 20:51:33 +00:00
Brian Anderson
f49f1575aa
Use correct conventions for static
2014-07-28 13:40:55 -07:00
bors
8d2e7161ee
auto merge of #16025 : cmr/rust/plugin-fields, r=alexcrichton
...
Some minor changes to the compiler to expose this information. Very
inconvenient since struct fields aren't an item.
2014-07-28 19:06:34 +00:00
nham
96cf01138b
Fix some of the documentation std::io::fs.
2014-07-28 14:14:56 -04:00
joaoxsouls
ef96b54b87
Fix typo in getopts::getopts documentation, return Matches instead of Opt
2014-07-28 17:35:31 +01:00
Aaron Turon
f26011d5a0
rustdoc: improvements to stability dashboard
...
* Makes dashboard width dynamic.
* Colors unmarked items.
* Gives overall crate percentages.
2014-07-28 08:41:53 -07:00
Jonas Hietala
3f56846460
doc: Method examples for String
...
Reword comments on unsafe methods regarding UTF-8.
2014-07-28 17:03:12 +02:00
Björn Steinbrink
a1c95ecca1
Emit lifetime end markers for allocas for ignored return values
2014-07-28 16:39:53 +02:00
Björn Steinbrink
39135ecb18
Omit unnecessary stack slots for ignored return values
...
If we have an immediate return value that doesn't need to be dropped, we
don't have to create a stack slot for it.
2014-07-28 16:39:13 +02:00
Corey Richardson
8876ce44c5
rustc: encode is_sugared_doc on ast::Attribute
2014-07-28 01:03:38 -07:00
Corey Richardson
fc08779185
rustdoc: remove extraneous .move_iter().collect()s
...
The impl of Clean for Vec obsoleted these long, long ago.
2014-07-28 01:03:38 -07:00
Corey Richardson
531a3c680d
rustdoc: show struct field docs when inlined
...
Some minor changes to the compiler to expose this information. Very
inconvenient since struct fields aren't an item. Adds (yet another) table to
metadata.
Closes #15739
2014-07-28 01:03:38 -07:00
nham
8ebd58cedf
Implement Ord for TrieMap/TrieSet/SmallIntMap/Bitv/BitvSet
2014-07-28 02:53:44 -04:00
nham
935c88ce1c
Implement PartialOrd for Bitv and BitvSet
2014-07-28 00:28:49 -04:00
nham
220f8f6dcb
Implement PartialOrd for SmallIntMap
2014-07-28 00:00:29 -04:00
nham
16acc10bf9
Implement PartialOrd for TrieMap and TrieSet
2014-07-27 23:51:28 -04:00
bors
f4ef36ee42
auto merge of #16031 : arielb1/rust/remove_unneeded_fixme, r=kballard
...
The issue was fixed a month ago - remove the workaround.
2014-07-27 22:41:15 +00:00
bors
79e9f14abf
auto merge of #16026 : ruud-v-a/rust/patch-1, r=steveklabnik
2014-07-27 20:51:16 +00:00
bors
70972832b3
auto merge of #16020 : nham/rust/ringbuf_hash_ord, r=alexcrichton
...
cc #15294
2014-07-27 19:06:16 +00:00
Steven Fackler
97721fa719
Make test expansion induce less reachability
...
We previously reexported entire modules, which caused private things to
become reachable and trip the dead code and private items in public API
lints.
Closes #15912
2014-07-27 12:02:19 -07:00
nham
e7b41caba8
Implement Hash for tuples of up to arity 12. Also change the style to be consistent with core::tuple
2014-07-27 14:41:33 -04:00
Jonas Hietala
58d3f109f8
doc: Small rewording.
2014-07-27 20:02:06 +02:00
bors
769dae0a00
auto merge of #16030 : treeman/rust/doc-hashset-fix, r=sfackler
...
Not sure how this could slip by.
2014-07-27 17:06:17 +00:00
nham
9fa4424b71
Hash the length of the RingBuf before hashing elements
2014-07-27 12:37:32 -04:00
Jonas Hietala
53c639184c
doc: Main example for TreeMap.
2014-07-27 18:19:04 +02:00
Jonas Hietala
8c34a97b37
doc: TreeMap methods with examples.
...
Small corrections for TreeSet examples.
2014-07-27 17:44:07 +02:00
Jonas Hietala
034ef079ef
doc: TreeSet methods and main example.
2014-07-27 17:04:44 +02:00
Ariel Ben-Yehuda
c6b992a53f
Remove an unneeded FIXME in coherence.rs
...
Also, let f; f = ...; is just wrong.
2014-07-27 18:01:19 +03:00
Jonas Hietala
28d543a40f
doc: Correctly onclose code blocks in HashSet
2014-07-27 16:05:53 +02:00
bors
e0d10bb69a
auto merge of #16016 : tomjakubowski/rust/rustdoc-fix-15490, r=alexcrichton
...
Previously, private and `#[doc(hidden)]` struct fields appeared in the
search index despite being hidden from the struct's documentation.
Fix #15490
2014-07-27 09:46:15 +00:00
Ruud van Asseldonk
d7993153a4
docs: Fix typo in container guide.
2014-07-27 10:14:44 +02:00
bors
ad4fa46f5b
auto merge of #16001 : Gankro/rust/rawstrings-proof, r=pnkfelix
...
Stumbled across this and thought it would be cool to prove. I've never used Ogden's Lemma before, but I'm pretty sure I used it right. The pumping lemma definitely doesn't seem sufficient for the job. In particular, when using the pumping lemma, you can always just pump one of the quotes, and it's fine. Ogden's Lemma lets you effectively force the pumper to use certain characters in the string.
@cmr
2014-07-27 08:01:14 +00:00
bors
d114ddac03
auto merge of #15963 : nham/rust/moar_15294, r=alexcrichton
...
Implements PartialEq/Eq/Clone/Hash/FromIterator/Extendable for SmallIntMap and Clone/Show for TrieMap/TrieSet. cc #15294
2014-07-27 06:16:14 +00:00