Skip to content

Rollup of 25 pull requests - #44623

Closed
frewsxcv wants to merge 71 commits into
rust-lang:masterfrom
frewsxcv:rollup
Closed

Rollup of 25 pull requests#44623
frewsxcv wants to merge 71 commits into
rust-lang:masterfrom
frewsxcv:rollup

Conversation

blussand others added 30 commits September 3, 2017 11:32
Implement downcast the like it exists for Box.
The implementation avoids using into_raw/from_raw, because the pointer
arithmetic which should cancel does not seem to optimize out at the
moment.
Since Rc<T> is never Send, only Rc<Any> and not Rc<Any + Send>
implements downcast.
On Windows, the gcc crate would send /Wall to msvc, which would cause
builds to get flooded with warnings, exploding compile times from one
hour to more than 72! The gcc crate version 0.3.54 changes this behavior
to send /W4 instead, which greatly cuts down on cl.exe flooding the
command prompt window with warnings.
In rust-lang#42436 the behavior for spawning processes on Windows was tweaked slightly to
fix various bugs, but this caused rust-lang#42791 as a regression, namely that to spawn
batch scripts they need to be manually spawned with `cmd /c` instead now. This
updates the compiler to handle this case explicitly for Emscripten.
Closesrust-lang#42791
Removing unwanted file merged in a previous commit
Most of the other rust-lang buckets are in us-west-1 and I think the original
bucket was just accidentally created in the us-east-1 region. Let's consolidate
by moving it to the same location as the rest of our buckets.
`FlatMap` can use internal iteration for its `fold`, which shows a
performance advantage in the new benchmarks:
test iter::bench_flat_map_chain_ref_sum ... bench: 4,354,111 ns/iter (+/- 108,871)
test iter::bench_flat_map_chain_sum ... bench: 468,167 ns/iter (+/- 2,274)
test iter::bench_flat_map_ref_sum ... bench: 449,616 ns/iter (+/- 6,257)
test iter::bench_flat_map_sum ... bench: 348,010 ns/iter (+/- 1,227)
... where the "ref" benches are using `by_ref()` that isn't optimized.
So this change shows a decent advantage on its own, but much more when
combined with a `chain` iterator that also optimizes `fold`.
This commit alters the `query` function in the dep graph module to preallocate
memory using `with_capacity` instead of relying on automatic growth. Discovered
in rust-lang#44576 it was found that for the syntex_syntax clean incremental benchmark
the peak memory usage was found when the dep graph was being saved, particularly
the `DepGraphQuery` data structure itself. PRs like rust-lang#44142 which add more
queries end up just making this much larger!
I didn't see an immediately obvious way to reduce the size of the
`DepGraphQuery` object, but it turns out that `with_capacity` helps quite a bit!
Locally 831 MB was used [before] this commit, and 770 MB is in use at the peak
of the compiler [after] this commit. That's a nice 7.5% improvement! This won't
quite make up for the losses in rust-lang#44142 but I figured it's a good start.
[before]: https://gist.github.com/alexcrichton/2d2b9c7a65503761925c5a0bcfeb0d1e
[before]: https://gist.github.com/alexcrichton/6da51f2a6184bfb81694cc44f06deb5b
extend E0623 for earlybound and latebound for structs
This fixesrust-lang#44508
r? @nikomatsakis
bring TyCtxt into scope
got comments both from @eddyb and @nikomatsakis (via rust-lang#44505) that we should always put `TyCtxt` in scope
should I just go and import it at other places in the codebase or we just keep doing small improvements?
rustdoc: pretty-print Unevaluated expressions in types.
Fixesrust-lang#44555.
r? @nikomatsakis
… r=alexcrichton
stabilized iterator_for_each (closesrust-lang#42986)
Also updated clippy and rls as these use the iterator_for_each
I've made my first PR's today so most likely I've done something wrong. Sorry about that!
…aidanhs
travis: Move sccache to the us-west-1 region
Most of the other rust-lang buckets are in us-west-1 and I think the original
bucket was just accidentally created in the us-east-1 region. Let's consolidate
by moving it to the same location as the rest of our buckets.
Customize `<FlatMap as Iterator>::fold`
`FlatMap` can use internal iteration for its `fold`, which shows a
performance advantage in the new benchmarks:
test iter::bench_flat_map_chain_ref_sum ... bench: 4,354,111 ns/iter (+/- 108,871)
test iter::bench_flat_map_chain_sum ... bench: 468,167 ns/iter (+/- 2,274)
test iter::bench_flat_map_ref_sum ... bench: 449,616 ns/iter (+/- 6,257)
test iter::bench_flat_map_sum ... bench: 348,010 ns/iter (+/- 1,227)
... where the "ref" benches are using `by_ref()` that isn't optimized.
So this change shows a decent advantage on its own, but much more when
combined with a `chain` iterator that also optimizes `fold`.
…elwoerister
rustc: Preallocate when building the dep graph
This commit alters the `query` function in the dep graph module to preallocate
memory using `with_capacity` instead of relying on automatic growth. Discovered
in rust-lang#44576 it was found that for the syntex_syntax clean incremental benchmark
the peak memory usage was found when the dep graph was being saved, particularly
the `DepGraphQuery` data structure itself. PRs like rust-lang#44142 which add more
queries end up just making this much larger!
I didn't see an immediately obvious way to reduce the size of the
`DepGraphQuery` object, but it turns out that `with_capacity` helps quite a bit!
Locally 831 MB was used [before] this commit, and 770 MB is in use at the peak
of the compiler [after] this commit. That's a nice 7.5% improvement! This won't
quite make up for the losses in rust-lang#44142 but I figured it's a good start.
[before]: https://gist.github.com/alexcrichton/2d2b9c7a65503761925c5a0bcfeb0d1e
[before]: https://gist.github.com/alexcrichton/6da51f2a6184bfb81694cc44f06deb5b
Require +thumb-mode to generate thumb2 code for Android/armv7-a
I am investigating rust's code generation into Gecko by https://bugzilla.mozilla.org/show_bug.cgi?id=1399337.
armv7-linux-androideabi target uses `+v7,+thumb2,+vfp3,+d16,-neon` as target-feature. But `+thumb2` only doesn't generate thumb2 code. To generate thumb2 code, it requires `+thumb-mode`. So we should add it for armv7-linux-androideabi.
r? @alexcrichton
…=eddyb
Get `allow(unused_mut)` to work on `let` bindings
fixesrust-lang#40491
Add Stylo and WebRender to src/tools/cargotest
This is a subset of Servo that takes relatively less time to compile and does not use unstable Rust features.
…imulacrum
Update cargo submodule
Just a routine update
…imulacrum
rustbuild: Update `cmake` dependency
Should help suppress some warnings from various repos as `cmake` in the newest
version disables warnings by default.
Mention that HashMap::new and HashSet::new do not allocate
The docs for `HashMap::with_capacity` and `HashSet::with_capacity` already say that
> If `capacity` is 0, the hash map/set will not allocate.
However, the docs for `::new` do not say that the initial capacity is 0, and thus promise that a call to `::new` alone does not allocate. This PR fixes that.
…, r=Mark-Simulacrum
rustbuild: Fix test "test rustdoc" invocation
Previously it would use the librustc output directory which would cause rustdoc
to get entirely recompiled, whereas the intention is that it uses the
already-compiled artifacts from building rustdoc itself, using the tool output
directory
…uietMisdreavus
Fix incorrect `into_inner` link in docs.
Fixesrust-lang#42373.
@rust-highfive

Copy link
Copy Markdown
Contributor

Some changes occurred in HTML/CSS.

cc @GuillaumeGomez

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@frewsxcv

Copy link
Copy Markdown
ContributorAuthor

@bors r+ p=10

@bors

bors commented Sep 16, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 78ef3fe has been approved by frewsxcv

@bors

bors commented Sep 16, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 78ef3fe with merge d4dfec1af0424d51111664dc110bdab0ae544973...

@bors

bors commented Sep 16, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

@kennytm

Copy link
Copy Markdown
Member

cargotest x86_64-pc-windows-msvc failed. Legit. #44603 included here already r-'ed.

failed to run: C:\projects\rust\build\bootstrap\debug\bootstrap src/tools/cargotest

@bors

bors commented Sep 16, 2017

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #43017) made this pull request unmergeable. Please resolve the merge conflicts.

@frewsxcv
frewsxcv deleted the rollup branch September 16, 2017 20:00
@CentrilCentril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@frewsxcv@rust-highfive@bors@kennytm@pickfire@Centril@arielb1@bluss@jcdyer@GuillaumeGomez@QuietMisdreavus@oli-obk@alexcrichton@qmx@gaurikholkar@eddyb@tamird@cuviper@makotokato@budziq