Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #29736

Closed
wants to merge 34 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fdb2826
Added try! example to documentation.md
Oct 28, 2015
b2c3745
Added "ignore" to rustdoc example, r=steveklabnik
Oct 29, 2015
f11d4a9
liballoc: deny warnings in doctests
Ryman Nov 3, 2015
3eb395a
libarena: deny warnings in doctests
Ryman Nov 3, 2015
81b1790
libcollections: deny warnings in doctests
Ryman Nov 3, 2015
d9c0114
libcore: deny warnings in doctests
Ryman Nov 3, 2015
589d826
libflate: deny warnings in doctests
Ryman Nov 3, 2015
623747a
libfmt_macros: deny warnings in doctests
Ryman Nov 3, 2015
6123df8
libgetopts: deny warnings in doctests
Ryman Nov 3, 2015
eb42797
libgraphviz: deny warnings in doctests
Ryman Nov 3, 2015
2a0b283
liblibc: deny warnings in doctests
Ryman Nov 3, 2015
d93ed29
liblog: deny warnings in doctests
Ryman Nov 3, 2015
8100f7f
librand: deny warnings in doctests
Ryman Nov 3, 2015
cc39abb
librbml: deny warnings in doctests
Ryman Nov 3, 2015
640aab3
librustc_unicode: deny warnings in doctests
Ryman Nov 3, 2015
569f29c
libserialize: deny warnings in doctests
Ryman Nov 3, 2015
ba24a03
libsyntax: deny warnings in doctests
Ryman Nov 3, 2015
50173f2
libterm: deny warnings in doctests
Ryman Nov 3, 2015
fb27172
libtest: deny warnings in doctests
Ryman Nov 3, 2015
956986a
trpl: add a small section outlining doctest configuration
Ryman Nov 3, 2015
46b30cc
Added foo() to rustdoc example, r=steveklabnik
Nov 8, 2015
dda7a3c
Fixed "foo()" in try! example, r=steveklabnik
Nov 8, 2015
e3433e3
Fix outdated comment in Vec::from_iter
stepancheg Nov 8, 2015
621e259
libstd: add example for PathBuf::push
Ryman Nov 9, 2015
c618c5f
Doc: Fix broken link on for-loop.html
defuz Nov 9, 2015
7793829
Redo the README intro again
brson Nov 9, 2015
abb9c90
Some cleanup on after #29684
steveklabnik Nov 10, 2015
a6aad39
Rollup merge of #29420 - efindlay:master, r=steveklabnik
steveklabnik Nov 10, 2015
1011f8e
Rollup merge of #29544 - Ryman:reduce_doc_warnings, r=steveklabnik
steveklabnik Nov 10, 2015
17d604f
Rollup merge of #29688 - stepancheg:vec-outdated, r=nikomatsakis
steveklabnik Nov 10, 2015
605ee3f
Rollup merge of #29708 - Ryman:pathdoc, r=steveklabnik
steveklabnik Nov 10, 2015
7f07f31
Rollup merge of #29715 - defuz:patch-3, r=alexcrichton
steveklabnik Nov 10, 2015
345fd17
Rollup merge of #29729 - brson:readme2, r=steveklabnik
steveklabnik Nov 10, 2015
9a468ed
Rollup merge of #29731 - steveklabnik:smallfix, r=alexcrichton
steveklabnik Nov 10, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix outdated comment in Vec::from_iter
Since commit 46068c9, call to `reserve()` on empty vec allocates
exactly requested capacity, so unroll of first iteration may help only
with branch prediction.
  • Loading branch information
stepancheg committed Nov 8, 2015
commit e3433e3b519dfaddedd5f18a514604a779799da3
3 changes: 1 addition & 2 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1220,8 +1220,7 @@ impl<T> FromIterator<T> for Vec<T> {
// expanded on this iteration in every case when the iterable is not
// empty, but the loop in extend_desugared() is not going to see the
// vector being full in the few subsequent loop iterations.
// So we get better branch prediction and the possibility to
// construct the vector with initial estimated capacity.
// So we get better branch prediction.
let mut iterator = iterable.into_iter();
let mut vector = match iterator.next() {
None => return Vec::new(),
Expand Down