-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 6 pull requests #51319
Merged
Merged
Rollup of 6 pull requests #51319
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
The examples for both hash_map::OccupiedEntry::get_mut and hash_map::OccupiedEntry::into_mut were almost identical. This led to some confusion over the difference, namely why you would ever use get_mut when into_mut gives alonger lifetime. Reddit thread: https://www.reddit.com/r/rust/comments/8a5swr/why_does_hashmaps This commit adds two lines and a comment to the example, to show that the entry object can be re-used after calling get_mut.
Also, rename the variable from "type_str" to "item_kind" to avoid the ambiguity that caused this bug.
…ertj Specify that packed types must derive, not implement, Copy
Make Layout's align a NonZeroUsize This PR makes the `Layout`'s align field a `NonZeroUsize` since it cannot ever be zero, not even while building a `Layout`. It also contains some drive-by minor cleanups over the docs and the code, like updating the documented error types, or using the `size()` and `align()` methods instead of accessing the fields directly (the latter was required for the `NonZeroUsize` change anyways). r? @SimonSapin cc @Amanieu
…=QuietMisdreavus Fix run button style r? @QuietMisdreavus
…=SimonSapin impl Default for &mut str Rationale: There is already `impl Default for &mut [T]`. Note: This impl is insta-stable.
…-mut, r=dtolnay Clarify the difference between get_mut and into_mut for OccupiedEntry The examples for both hash_map::OccupiedEntry::get_mut and hash_map::OccupiedEntry::into_mut were almost identical. This led to some confusion over the difference, namely why you would ever use get_mut when into_mut gives alonger lifetime. Reddit thread: https://www.reddit.com/r/rust/comments/8a5swr/why_does_hashmaps This commit adds two lines and a comment to the example, to show that the entry object can be re-used after calling get_mut. Closes rust-lang#49745
… r=oli-obk use type name in E0599 enum variant suggestion Also, rename the variable from "type_str" to "item_kind" to avoid the ambiguity that caused this bug.
Some changes occurred in HTML/CSS. |
r? @bluss (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ p=1 |
📌 Commit c09cad1 has been approved by |
bors
added a commit
that referenced
this pull request
Jun 3, 2018
Rollup of 6 pull requests Successful merges: - #51143 (Specify that packed types must derive, not implement, Copy) - #51226 (Make Layout's align a NonZeroUsize) - #51297 (Fix run button style) - #51306 (impl Default for &mut str) - #51312 (Clarify the difference between get_mut and into_mut for OccupiedEntry) - #51313 (use type name in E0599 enum variant suggestion) 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:
Failed merges: