Skip to content

Rollup of 9 pull requests - #51403

Closed
Mark-Simulacrum wants to merge 26 commits into
rust-lang:masterfrom
Mark-Simulacrum:rollup
Closed

Rollup of 9 pull requests#51403
Mark-Simulacrum wants to merge 26 commits into
rust-lang:masterfrom
Mark-Simulacrum:rollup

Conversation

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

Dylan-DPCand others added 26 commits June 2, 2018 17:27
fdio_spawn_etc is the preferred way of creating processes on Fuchsia
now.
This patch adds depth markings to all entries in the `ScopeTree`'s
`parent_map`. This change increases memory usage somewhat, but permits a
much faster algorithm to be used:
- If one scope has a greater depth than the other, the deeper scope is
moved upward until they are at equal depths.
- Then we move the two scopes upward in lockstep until they match.
This avoids the need to keep track of which scopes have already been
seen, which was the major part of the cost of the old algorithm. It also
reduces the number of child-to-parent moves (which are hash table
lookups) when the scopes start at different levels, because it never
goes past the nearest common ancestor the way the old algorithm did.
Finally, the case where one of the scopes is the root is now handled in
advance, because that is moderately common and lets us skip everything.
This change speeds up runs of several rust-perf benchmarks, the best by
6%.
…are now exactly the same as that produced by AST borrowck. Bravo!
…derr-files, r=oli-obk
Remove two redundant .nll.stderr files
It turns out that the diagnostics generated from NLL for these cases are now exactly the same as that produced by AST borrowck, and thus we can just fallback on those `.stderr` files that already exist for AST-borrowck.
Bravo!
(it is a good idea to remove these files, because it slightly reduces the amount of time humans will spend reviewing the .nll.stderr fileset...)
((it *might* be worthwhile trying to change the `compiletest` code to even issue a warning when two such files have equivalent contents... but I am not going so far as to try to implement that right now...))
…ved-from-behind-borrow, r=nikomatsakis
NLL: report type moved from behind borrow of array/slice
When NLL has illegal move due to borrowed content in an array or slice, provide feedback about why the move wasn't a copy.
Drive by: While comparing the resulting `.nll.stderr` files to their old borrowck variants, I noticed that the test for borrowck-vec-pattern-nesting.rs was not signaling some errors under NLL due to the test assuming lexical lifetimes. So I fixed that too.
Fixrust-lang#51190
…t, r=nikomatsakis
Stabilize unit tests with non-`()` return type
References rust-lang#48854
[fuchsia] Migrate from launchpad to fdio_spawn_etc
fdio_spawn_etc is the preferred way of creating processes on Fuchsia
now.
cc @abarth
…s, r=eddyb
Fix the use of closures within #[panic_implementation]
Fixesrust-lang#51365.
…r=oli-obk
Remove dependency on fmt_macros from typeck
None
…b, r=QuietMisdreavus
rustdoc: Fix missing stability and src links for inlined external macros
Fixesrust-lang#38951
r? @QuietMisdreavus
Use scope tree depths to speed up `nearest_common_ancestor`.
This patch adds depth markings to all entries in the `ScopeTree`'s
`parent_map`. This change increases memory usage somewhat, but permits a
much faster algorithm to be used:
- If one scope has a greater depth than the other, the deeper scope is
moved upward until they are at equal depths.
- Then we move the two scopes upward in lockstep until they match.
This avoids the need to keep track of which scopes have already been
seen, which was the major part of the cost of the old algorithm. It also
reduces the number of child-to-parent moves (which are hash table
lookups) when the scopes start at different levels, because it never
goes past the nearest common ancestor the way the old algorithm did.
Finally, the case where one of the scopes is the root is now handled in
advance, because that is moderately common and lets us skip everything.
This change speeds up runs of several rust-perf benchmarks, the best by
6%.
A selection of the bigger improvements:
```
clap-rs-check
avg: -2.6% min: -6.6% max: 0.0%
syn-check
avg: -2.2% min: -5.0% max: 0.0%
style-servo-check
avg: -2.9%? min: -4.8%? max: 0.0%?
cargo-check
avg: -1.3% min: -2.8% max: 0.0%
sentry-cli-check
avg: -1.0% min: -2.1% max: 0.0%
webrender-check
avg: -0.9% min: -2.0% max: 0.0%
style-servo
avg: -0.9%? min: -1.8%? max: -0.0%?
ripgrep-check
avg: -0.7% min: -1.8% max: 0.1%
clap-rs
avg: -0.9% min: -1.6% max: -0.2%
regex-check
avg: -0.2% min: -1.3% max: 0.1%
syn
avg: -0.6% min: -1.3% max: 0.1%
hyper-check
avg: -0.5% min: -1.1% max: 0.0%
```
The idea came from multiple commenters on my blog and on Reddit. Thank you!
r? @nikomatsakis
NLL performance boost
This makes compilation of the [inflate](https://github.com/rust-lang-nursery/rustc-perf/tree/master/collector/benchmarks/inflate) benchmark compile 2 times faster on my computer when NLL is enabled.
This does not fixrust-lang#51377 perfectly, it's still 4-5 times slower than without NLL, but it's a start.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @pnkfelix

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 6, 2018
@Mark-Simulacrum

Copy link
Copy Markdown
MemberAuthor

@bors r+ p=10

r? @Mark-Simulacrum

@bors

bors commented Jun 6, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit ff120c9 has been approved by Mark-Simulacrum

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2018
@bors

bors commented Jun 7, 2018

Copy link
Copy Markdown
Collaborator

🔒 Merge conflict

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 7, 2018
@Mark-Simulacrum
Mark-Simulacrum deleted the rollup branch June 7, 2018 01:12
@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 rollupS-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11 participants

@Mark-Simulacrum@rust-highfive@bors@pnkfelix@Centril@Dylan-DPC@varkor@abarth@ollie27@nnethercote@ngg