-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 13 pull requests #51448
Merged
Merged
Rollup of 13 pull requests #51448
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When writing a struct literal in an expression that expects a block to be started afterwards (like an `if` statement), do not suggest using the same struct literal: ``` did you mean `S { /* fields * /}`? ``` Instead, suggest surrounding the expression with parentheses: ``` did you mean `(S { /* fields * /})`? ```
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%.
Closes rust-lang#49137, the tracking issue for `NonZero*`, as this was the last remaining open question. Note that `ptr::NonNull<T>` already documents a similar guarantee.
Use spans pointing at the inside of a rustdoc attribute Follow up to rust-lang#51111. Point to the link in a rustdoc attribute where intralink resolution failed, instead of the full rustdoc attribute's span. r? @GuillaumeGomez cc @kennytm
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
…=SimonSapin Make the size of Option<NonZero*> a documented guarantee. Closes rust-lang#49137, the tracking issue for `NonZero*`, as this was the last remaining open question. Note that `ptr::NonNull<T>` already documents a similar guarantee.
Warn on `repr` without hints Fix rust-lang#51376.
…estebank Avoid useless Vec clones in pending_obligations(). The only instance of `ObligationForest` in use has an obligation type of `PendingPredicateObligation`, which contains a `PredicateObligation` and a `Vec<Ty>`. `FulfillmentContext::pending_obligations()` calls `ObligationForest::pending_obligations()`, which clones all the `PendingPredicateObligation`s. But the `Vec<Ty>` field of those cloned obligations is never touched. This patch changes `ObligationForest::pending_obligations()` to `map_pending_obligations` -- which gives callers control about which part of the obligation to clone -- and takes advantage of the change to avoid cloning the `Vec<Ty>`. The change speeds up runs of a few rustc-perf benchmarks, the best by 1%.
…oli-obk compiletest: autoremove duplicate .nll.* files (rust-lang#51204) UI tests in bless mode should now check to see if `.nll.*` files have a matching `.*` file. If a match is found, it will be deleted. This should be extensible to other modes (i.e., Polonius). On running with `--bless`, the two files removed in rust-lang#51186 are, in turn, removed automatically. fixes rust-lang#51204
…Misdreavus Do not require stage 2 compiler for rustdoc r? @QuietMisdreavus Fixes rust-lang#51424 I *think* this is correct; though I'm not certain. If it passes CI though I expect that to be good enough...
…mulacrum rustbuild: generate full list of dependencies for metadata Previously, we didn't send --features to our cargo metadata invocations, and thus missed some dependencies that we enable through the --features mechanism.
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jun 8, 2018
@bors r+ p=10 |
📌 Commit 8c5002d has been approved by |
bors
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 8, 2018
bors
added a commit
that referenced
this pull request
Jun 8, 2018
Rollup of 13 pull requests Successful merges: - #50143 (Add deprecation lint for duplicated `macro_export`s) - #51099 (Fix Issue 38777) - #51276 (Dedup auto traits in trait objects.) - #51298 (Stabilize unit tests with non-`()` return type) - #51360 (Suggest parentheses when a struct literal needs them) - #51391 (Use spans pointing at the inside of a rustdoc attribute) - #51394 (Use scope tree depths to speed up `nearest_common_ancestor`.) - #51396 (Make the size of Option<NonZero*> a documented guarantee.) - #51401 (Warn on `repr` without hints) - #51412 (Avoid useless Vec clones in pending_obligations().) - #51427 (compiletest: autoremove duplicate .nll.* files (#51204)) - #51436 (Do not require stage 2 compiler for rustdoc) - #51437 (rustbuild: generate full list of dependencies for metadata) Failed merges:
☀️ Test successful - status-appveyor, status-travis |
This was referenced Jun 9, 2018
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
macro_export
s #50143 (Add deprecation lint for duplicatedmacro_export
s)()
return type #51298 (Stabilize unit tests with non-()
return type)nearest_common_ancestor
. #51394 (Use scope tree depths to speed upnearest_common_ancestor
.)repr
without hints #51401 (Warn onrepr
without hints).nll.stderr
file matches the.stderr
file #51204))Failed merges: