Skip to content
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 17 commits into from
Jun 3, 2018
Merged

Rollup of 6 pull requests #51319

merged 17 commits into from
Jun 3, 2018

Conversation

Mark-Simulacrum
Copy link
Member

Successful merges:

Failed merges:

gnzlbg and others added 17 commits May 30, 2018 21:00
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
…=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.
@rust-highfive
Copy link
Contributor

Some changes occurred in HTML/CSS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Contributor

r? @bluss

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 3, 2018
@Mark-Simulacrum
Copy link
Member Author

@bors r+ p=1

r? @Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented Jun 3, 2018

📌 Commit c09cad1 has been approved by Mark-Simulacrum

@bors 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 3, 2018
@bors
Copy link
Collaborator

bors commented Jun 3, 2018

⌛ Testing commit c09cad1 with merge 3575be6...

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:
@bors
Copy link
Collaborator

bors commented Jun 3, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: Mark-Simulacrum
Pushing 3575be6 to master...

@bors bors merged commit c09cad1 into rust-lang:master Jun 3, 2018
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.