Skip to content

Rollup of 6 pull requests - #51319

Merged
bors merged 17 commits into
rust-lang:masterfrom
Mark-Simulacrum:rollup
Jun 3, 2018
Merged

Rollup of 6 pull requests#51319
bors merged 17 commits into
rust-lang:masterfrom
Mark-Simulacrum:rollup

Conversation

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

gnzlbgand 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.
Closesrust-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
Copy Markdown
Contributor

Some changes occurred in HTML/CSS.

cc @GuillaumeGomez

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @bluss

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

@rust-highfiverust-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
Copy Markdown
MemberAuthor

@bors r+ p=1

r? @Mark-Simulacrum

@bors

bors commented Jun 3, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit c09cad1 has been approved by Mark-Simulacrum

@borsbors 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

bors commented Jun 3, 2018

Copy link
Copy Markdown
Collaborator

⌛ 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

bors commented Jun 3, 2018

Copy link
Copy Markdown
Collaborator

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

@bors
bors merged commit c09cad1 into rust-lang:masterJun 3, 2018
@CentrilCentril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollupS-waiting-on-borsStatus: 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.

11 participants

@Mark-Simulacrum@rust-highfive@bors@Centril@bluss@gnzlbg@GuillaumeGomez@kennytm@Phlosioneer@euclio@frewsxcv