-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #50191
Merged
Merged
Rollup of 11 pull requests #50191
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
This patch makes it clear in std::process::Child::kill()'s API documentation that an error is returned if the child process has already cleanly exited. This is implied by the example, but not called out explicitly.
Add documentation links to the original type for various OS-specific extension traits and normalize the language for introducing such traits. Also, remove some outdated comments around the extension trait definitions.
The unstable-feature attribute requires an issue (neglecting it is E0547), which gets used in the error messages. Unfortunately, there are some cases where "0" is apparently used a placeholder where no issue exists, directing the user to see the (nonexistent) issue #0. (It would have been better to either let `issue` be optional—compare to how issue is an `Option<u32>` in the feature-gate declarations in libsyntax/feature-gate.rs—or actually require that an issue be created.) Rather than endeavoring to change how `#[unstable]` works at this time (given competing contributor and reviewer priorities), this simple patch proposes the less-ambitious solution of just not adding the "(see issue)" note when the number is zero. Resolves rust-lang#49983.
Because it's faster than HashMap. This change reduces the time taken for a few of the rustc-perf benchmarks, mostly the small ones, by up to 5%.
…-Simulacrum std: Child::kill() returns error if process has already exited This patch makes it clear in std::process::Child::kill()'s API documentation that an error is returned if the child process has already cleanly exited. This is implied by the example, but not called out explicitly.
Add Cell::update This commit adds a new method `Cell::update`, which applies a function to the value inside the cell. Previously discussed in: rust-lang/rfcs#2171 ### Motivation Updating `Cell`s is currently a bit verbose. Here are several real examples (taken from rustc and crossbeam): ```rust self.print_fuel.set(self.print_fuel.get() + 1); self.diverges.set(self.diverges.get() | Diverges::Always); let guard_count = self.guard_count.get(); self.guard_count.set(guard_count.checked_add(1).unwrap()); if guard_count == 0 { // ... } ``` With the addition of the new method `Cell::update`, this code can be simplified to: ```rust self.print_fuel.update(|x| x + 1); self.diverges.update(|x| x | Diverges::Always); if self.guard_count.update(|x| x.checked_add(1).unwrap()) == 1 { // ... } ``` ### Unresolved questions 1. Should we return the old value instead of the new value (like in `fetch_add` and `fetch_update`)? 2. Should the return type simply be `()`? 3. Naming: `update` vs `modify` vs `mutate` etc. cc @SimonSapin
…akis Fix revision support for UI tests. Fixes rust-lang#48878
Add doc links to `std::os` extension traits Addresses a small subset of rust-lang#29367. This adds documentation links to the original type for various OS-specific extension traits, and uses a common sentence for introducing such traits (which now consistently ends in a period).
Stabilize `std::hint::unreachable_unchecked`. Closes rust-lang#43751.
Deprecate Read::chars and char::decode_utf8 Per FCP: * rust-lang#27802 (comment) * rust-lang#33906 (comment)
don't see issue #0 The unstable-feature attribute requires an issue (neglecting it is E0547), which gets used in the error messages. Unfortunately, there are some cases where "0" is apparently used a placeholder where no issue exists, directing the user to see the (nonexistent) issue #0. (It would have been better to either let `issue` be optional—compare to how issue is an `Option<u32>` in the feature-gate declarations in libsyntax/feature-gate.rs—or actually require that an issue be created.) Rather than endeavoring to change how `#[unstable]` works at this time (given competing contributor and reviewer priorities), this simple patch proposes the less-ambitious solution of just not adding the "(see issue)" note when the number is zero. Resolves rust-lang#49983.
…ietMisdreavus fix search bar bug Fixes rust-lang#50064. r? @QuietMisdreavus
encourage descriptive issue titles There are two sides to avoiding duplicate issues, searching for existing ones, and making sure existing ones can be searched for. This addresses the later. r? @steveklabnik
…ichaelwoerister Use FxHashMap in syntax_pos::symbol::Interner::intern. Because it's faster than HashMap. This change reduces the time taken for a few of the rustc-perf benchmarks, mostly the small ones, by up to 5%. ``` coercions avg: -1.3% min: -5.5% max: -0.0% helloworld-check avg: -2.3% min: -3.5% max: -1.8% deeply-nested-check avg: -1.4% min: -3.2% max: -0.5% tuple-stress-opt avg: -0.7% min: -2.0% max: -0.1% unify-linearly-check avg: -1.2% min: -1.9% max: -0.6% coercions-check avg: -0.8% min: -1.3% max: -0.4% unused-warnings-check avg: -1.0% min: -1.3% max: -0.8% deeply-nested-opt avg: -0.5% min: -1.2% max: -0.2% deeply-nested avg: -0.7% min: -1.2% max: -0.4% helloworld avg: -0.8% min: -1.1% max: -0.7% tuple-stress-check avg: -0.5% min: -1.0% max: -0.1% unused-warnings avg: -0.8% min: -1.0% max: -0.7% unused-warnings-opt avg: -0.8% min: -1.0% max: -0.7% coercions-opt avg: -0.5% min: -1.0% max: -0.1% helloworld-opt avg: -0.7% min: -1.0% max: -0.6% ```
core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN` This commit removes usage of `abs`, which overflows when `self == MIN`.
Some changes occurred in HTML/CSS. |
(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
Apr 24, 2018
@bors r+ p=11 |
📌 Commit 893774e 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
Apr 24, 2018
bors
added a commit
that referenced
this pull request
Apr 24, 2018
Rollup of 11 pull requests Successful merges: - #49461 (std: Child::kill() returns error if process has already exited) - #49727 (Add Cell::update) - #49812 (Fix revision support for UI tests.) - #49829 (Add doc links to `std::os` extension traits) - #49906 (Stabilize `std::hint::unreachable_unchecked`.) - #49970 (Deprecate Read::chars and char::decode_utf8) - #49985 (don't see issue #0) - #50118 (fix search bar bug) - #50139 (encourage descriptive issue titles) - #50174 (Use FxHashMap in syntax_pos::symbol::Interner::intern.) - #50185 (core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN`) Failed merges:
☀️ Test successful - status-appveyor, status-travis |
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:
std::os
extension traits #49829 (Add doc links tostd::os
extension traits)std::hint::unreachable_unchecked
. #49906 (Stabilizestd::hint::unreachable_unchecked
.)int::mod_euc
whenself < 0 && rhs == MIN
#50185 (core: Fix overflow inint::mod_euc
whenself < 0 && rhs == MIN
)Failed merges: