-
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 12 pull requests #36953
Merged
Merged
Rollup of 12 pull requests #36953
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
These are displayed by rustdoc so should be correct.
- Fixes rust-lang#36164 - Part of rust-lang#35233 - handles unknown fields - uses UI-style tests - update all related tests (cfail, ui, incremental)
As it stands, getting-started and guessing-game both introduce `run` as a new command. The second should probably make it clear that the reader has seen it before :)
This commit avoids the `fold_regions` call in `plug_leaks` when `skol_map` is empty, which is the common case. This gives speed-ups of up to 1.14x on some of the rustc-benchmarks.
This commit avoids the `resolve_type_vars_if_possible` call in `plug_leaks` when `skol_map` is empty, which is the common case. It also changes the signature of `plug_leaks` slightly to avoid the need for a `clone` of `value`. These changes give speed-ups of up a few percent on some of the rustc-benchmarks.
First, assert! is redundant w.r.t. the unwrap() immediately afterwards. Second, `byte_offset_diff` is effectively computed as `current_byte_offset + ch.len_utf8() - current_byte_offset` (with `next` as an intermediate) which is silly and can be simplified.
The two branches of this `if` compute the same value. This commit gets rid of the first branch, which makes this calculation identical to the one in scan_block_comment().
Ensure that cursor position fits into usize, before proceeding with write. Fixes issue rust-lang#36884.
This ICE occurs in the futures-rs-test-all benchmark in rustc-benchmarks.
Improve error message and snippet for "did you mean `x`" - Fixes rust-lang#36164 - Part of rust-lang#35233 Based on the standalone example https://is.gd/8STXMd posted by @nikomatsakis and using the third formatting option mentioned in rust-lang#36164 and agreed by @jonathandturner. Note however this does not address the question of [how to handle an empty or unknown suggestion](rust-lang#36164 (comment)). @nikomatsakis any suggestions on how best to address that part?
…n-intro, r=GuillaumeGomez Avoid introducing `run` twice in the Rust book As it stands, getting-started.md and guessing-game.md both introduce `run` as a new command. I switched it so that the 2nd refers back to the first introduction, rather than re-introducing the command. (First ever FOSS PR, sorry if I screwed up anything obvious :) ) r? @steveklabnik
std: Correct stability attributes for some implementations These are displayed by rustdoc so should be correct.
Minor librustdoc cleanup and refactoring.
…l422 fix typos r? @steveklabnik
Update unstable attr to reference tracking issue.
…eddyb Speed up `plug_leaks` Profiling shows that `plug_leaks` and the functions it calls are hot on some benchmarks. It's very common that `skol_map` is empty in this function, and we can specialize `plug_leaks` in that case for some big speed-ups. The PR has two commits. I'm fairly confident that the first one is correct -- I traced through the code to confirm that the `fold_regions` and `pop_skolemized` calls are no-ops when `skol_map` is empty, and I also temporarily added an assertion to check that `result` ends up having the same value as `value` in that case. This commit is responsible for most of the improvement. I'm less confident about the second commit. The call to `resolve_type_vars_is_possible` can change `value` when `skol_map` is empty... but testing suggests that it doesn't matter if the call is omitted. So, please check both patches carefully, especially the second one! Here are the speed-ups for the first commit alone. stage1 compiler (built with old rustc, using glibc malloc), doing debug builds: ``` futures-rs-test 4.710s vs 4.538s --> 1.038x faster (variance: 1.009x, 1.005x) issue-32062-equ 0.415s vs 0.368s --> 1.129x faster (variance: 1.009x, 1.010x) issue-32278-big 1.884s vs 1.808s --> 1.042x faster (variance: 1.020x, 1.017x) jld-day15-parse 1.907s vs 1.668s --> 1.143x faster (variance: 1.011x, 1.007x) piston-image-0. 13.024s vs 12.421s --> 1.049x faster (variance: 1.004x, 1.012x) rust-encoding-0 3.335s vs 3.276s --> 1.018x faster (variance: 1.021x, 1.028x) ``` stage2 compiler (built with new rustc, using jemalloc), doing debug builds: ``` futures-rs-test 4.167s vs 4.065s --> 1.025x faster (variance: 1.006x, 1.018x) issue-32062-equ 0.383s vs 0.343s --> 1.118x faster (variance: 1.012x, 1.016x) issue-32278-big 1.680s vs 1.621s --> 1.036x faster (variance: 1.007x, 1.007x) jld-day15-parse 1.671s vs 1.478s --> 1.131x faster (variance: 1.016x, 1.004x) piston-image-0. 11.336s vs 10.852s --> 1.045x faster (variance: 1.003x, 1.006x) rust-encoding-0 3.036s vs 2.971s --> 1.022x faster (variance: 1.030x, 1.032x) ``` I've omitted the benchmarks for which the change was negligible. And here are the speed-ups for the first and second commit in combination. stage1 compiler (built with old rustc, using glibc malloc), doing debug builds: ``` futures-rs-test 4.684s vs 4.498s --> 1.041x faster (variance: 1.012x, 1.012x) issue-32062-equ 0.413s vs 0.355s --> 1.162x faster (variance: 1.019x, 1.006x) issue-32278-big 1.869s vs 1.763s --> 1.060x faster (variance: 1.013x, 1.018x) jld-day15-parse 1.900s vs 1.602s --> 1.186x faster (variance: 1.010x, 1.003x) piston-image-0. 12.907s vs 12.352s --> 1.045x faster (variance: 1.005x, 1.006x) rust-encoding-0 3.254s vs 3.248s --> 1.002x faster (variance: 1.063x, 1.045x) ``` stage2 compiler (built with new rustc, using jemalloc), doing debug builds: ``` futures-rs-test 4.183s vs 4.046s --> 1.034x faster (variance: 1.007x, 1.004x) issue-32062-equ 0.380s vs 0.340s --> 1.117x faster (variance: 1.020x, 1.003x) issue-32278-big 1.671s vs 1.616s --> 1.034x faster (variance: 1.031x, 1.012x) jld-day15-parse 1.661s vs 1.417s --> 1.172x faster (variance: 1.013x, 1.005x) piston-image-0. 11.347s vs 10.841s --> 1.047x faster (variance: 1.007x, 1.010x) rust-encoding-0 3.050s vs 3.000s --> 1.017x faster (variance: 1.016x, 1.012x) ``` @eddyb: `git blame` suggests that you should review this. Thanks!
Two lexer tweaks 19 days later, I haven't received a review of my commits in rust-lang#36470. In an attempt to make some progress, I'm going to split up the changes. Here are the ones that don't relate to renaming things.
…labnik Add missing urls for error module r? @steveklabnik
…xcrichton Check for overflow in Cursor<Vec<u8>>::write. Ensure that cursor position fits into usize, before proceeding with write. Fixes issue rust-lang#36884.
Add regression test for Issue rust-lang#21837 This PR adds a regression test for Issue rust-lang#21837, as explained in the comments of the issue.
Fix an ICE in BuildReducedGraphVisitor::visit_trait_item. This ICE occurs in the futures-rs-test-all benchmark in rustc-benchmarks (fixes rust-lang#36950).
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ p=10 |
📌 Commit 177aabd has been approved by |
This was referenced Oct 4, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
x
" #36798, Avoid introducingrun
twice in the Rust book #36878, std: Correct stability attributes for some implementations #36902, Minor librustdoc cleanup and refactoring. #36903, fix typos #36908, Update unstable attr to reference tracking issue. #36916, Speed upplug_leaks
#36917, Two lexer tweaks #36921, Add missing urls for error module #36928, Check for overflow in Cursor<Vec<u8>>::write. #36938, Add regression test for Issue #21837 #36941, Fix an ICE in BuildReducedGraphVisitor::visit_trait_item. #36951