-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 11 pull requests #46166
Merged
Merged
Rollup of 11 pull requests #46166
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
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
This patch makes `read_to_end` use Vec's memory-growth pattern rather than using a custom pattern. This has some interesting effects: - If memory is reserved up front, `read_to_end` can be faster, as it starts reading at the buffer size, rather than always starting at 32 bytes. This speeds up file reading by 2x in one of my use cases. - It can reduce the number of syscalls when reading large files. Previously, `read_to_end` would settle into a sequence of 8192-byte reads. With this patch, the read size follows Vec's allocation pattern. For example, on a 16MiB file, it can do 21 read syscalls instead of 2057. In simple benchmarks of large files though, overall speed is still dominated by the actual I/O. - A downside is that Read implementations that don't implement `initializer()` may see increased memory zeroing overhead. I benchmarked this on a variety of data sizes, with and without preallocated buffers. Most benchmarks see no difference, but reading a small/medium file with a pre-allocated buffer is faster.
As reported in rust-lang#19140, rust-lang#44083, and rust-lang#44565, some users were confused when the dead-code lint reported an enum variant to be "unused" when it was matched on (but not constructed). This wording change makes it clearer that the lint is in fact checking for construction. We continue to say "used" for all other items (it's tempting to say "called" for functions and methods, but this turns out not to be correct: functions can be passed as arguments and the dead-code lint isn't special-casing that or anything). Resolves rust-lang#19140.
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Fix a typo in ToSocketAddrs documentation: s/ToSocketsAddr/ToSocketAddrs
It doesn’t change anything for stable users in practice. See discussion in rust-lang#46148
This is a follow-up to rust-lang#45225 (comment) now that upstream has adjusted servo/servo#19316
before: DefId { krate: CrateNum(11), index: DefIndex(0:6) => foo[8787]::Mapper[0]::OtherType[0] } } after: DefId(11:0:6 ~ foo[8787]::Mapper[0]::OtherType[0])
…rister update let-expressions hash test to use `except` A part of rust-lang#44924, this PR updated let-expressions test using `except`. cc @michaelwoerister r? @nikomatsakis
rustbuild: distribute cargo-fmt alongside rustfmt Not sure whether we want that nor if it's the right way to do so, but it feels quite weird to have rustfmt without cargo-fmt. Or are there other plans wrt that? What do you think @nrc ?
Optimize `read_to_end`. This patch makes `read_to_end` use Vec's memory-growth pattern rather than using a custom pattern. This has some interesting effects: - If memory is reserved up front, `read_to_end` can be faster, as it starts reading at the buffer size, rather than always starting at 32 bytes. This speeds up file reading by 2x in one of my use cases. - It can reduce the number of syscalls when reading large files. Previously, `read_to_end` would settle into a sequence of 8192-byte reads. With this patch, the read size follows Vec's allocation pattern. For example, on a 16MiB file, it can do 21 read syscalls instead of 2057. In simple benchmarks of large files though, overall speed is still dominated by the actual I/O. - A downside is that Read implementations that don't implement `initializer()` may see increased memory zeroing overhead. I benchmarked this on a variety of data sizes, with and without preallocated buffers. Most benchmarks see no difference, but reading a small/medium file with a pre-allocated buffer is faster.
…n, r=petrochenkov Include rendered diagnostic in json r? @petrochenkov
…y_never_constructed_for_variants, r=arielb1 dead code lint to say "never constructed" for variants As reported in rust-lang#19140, rust-lang#44083, and rust-lang#44565, some users were confused when the dead-code lint reported an enum variant to be "unused" when it was matched on (but not constructed). This wording change makes it clearer that the lint is in fact checking for construction. We continue to say "used" for all other items (it's tempting to say "called" for functions and methods, but this turns out not to be correct: functions can be passed as arguments and the dead-code lint isn't special-casing that or anything). Resolves rust-lang#19140. r? @pnkfelix
clean the Debug impl for CrateNum and DefId Just a tiny quality-of-life improvement because I got tired of noisy debug logs. ``` before: DefId { krate: CrateNum(11), index: DefIndex(0:6) => foo[8787]::Mapper[0]::OtherType[0] } } after: {crate11:0:6 ~ foo[8787]::Mapper[0]::OtherType[0]}) ``` r? @michaelwoerister
…uietMisdreavus Display negative traits implementation Fixes rust-lang#45816. r? @QuietMisdreavus
…=frewsxcv Fix a typo in ToSocketAddrs documentation Fix a typo in `ToSocketAddrs` documentation: s/ToSocketsAddr/ToSocketAddrs
Expand a couple points in 1.22.0 release notes Let’s not give false hopes about `const fn` :)
Revert servo to upstream in cargotest This is a follow-up to rust-lang#45225 (comment) now that upstream has adjusted: servo/servo#19316
fix some typos This is the result of me testing out a WIP source code typo-finder and your project was the random target this time.
@bors r+ p=9 |
📌 Commit 7c8b36f has been approved by |
kennytm
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Nov 21, 2017
☀️ Test successful - status-appveyor, status-travis |
This was referenced Nov 21, 2017
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.
except
#45987, rustbuild: distribute cargo-fmt alongside rustfmt #46031, Optimizeread_to_end
. #46050, Include rendered diagnostic in json #46052, dead code lint to say "never constructed" for variants #46103, clean the Debug impl for CrateNum and DefId #46120, Display negative traits implementation #46134, Fix a typo in ToSocketAddrs documentation #46141, Expand a couple points in 1.22.0 release notes #46148, Revert servo to upstream in cargotest #46155, fix some typos #46157