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 9 pull requests #86456

Merged
merged 18 commits into from
Jun 19, 2021
Merged

Rollup of 9 pull requests #86456

merged 18 commits into from
Jun 19, 2021

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

m-ou-se and others added 18 commits June 8, 2021 16:45
I find this more consistent with RefCell's equivalent method.
… r=m-ou-se

Stabilize span_open() and span_close().

This proposes to stabilize `Group::span_open()` and `Group::span_close()`.

These are part of the `proc_macro_span` feature gate tracked in rust-lang#54725

Most of the features gated behind `proc_macro_span` are about source location information (file path, line and column information), expansion information (parent()), source_text(), etc. Those are not ready for stabilizaiton. However, getting the span of the `(` and `)` separately instead of only of the entire `(...)` can be very useful in proc macros, and doesn't seem blocked on anything that all the other parts of `proc_macro_span` are blocked on. So, this renames the feature gate for those two functions to `proc_macro_group_span` and stabilizes them.
…hnTitor

Use as_secs_f64 in JunitFormatter

cc `@andoriyu`
…d-versions-layout, r=GuillaumeGomez

Fix rustdoc stabilized versions layout

Fixes rust-lang#86342
r? `@GuillaumeGomez`
Alter std::cell::Cell::get_mut documentation

I felt that there was some inconsistency between between Cell and RefCell with regards to their `get_mut` method documentation: `RefCell` flags this method as "unusual" in that it takes `&mut self`, while `Cell` does not. I attempted to flag this in `Cell`s documentation as well, and point to `RefCell`s method in the case where it is required.

Find relevant parts of docs and the new version below.

The current docs for `Cell::get_mut`:
> Returns a mutable reference to the underlying data.
This call borrows Cell mutably (at compile-time) which guarantees that we possess the only reference.

And `RefCell::get_mut`:
> Returns a mutable reference to the underlying data.
 This call borrows `RefCell` mutably (at compile-time) so there is no need for dynamic checks.
However be cautious: this method expects self to be mutable, which is generally not the case when using a `RefCell`. Take a look at the `borrow_mut` method instead if self isn’t mutable.
Also, please be aware that this method is only for special circumstances and is usually not what you want. In case of doubt, use `borrow_mut` instead.

My attempt to make `Cell::get_mut` clearer:
> Returns a mutable reference to the underlying data.
This call borrows `Cell` mutably (at compile-time) which guaranteesthat we possess the only reference.
However be cautious: this method expects `self` to be mutable, which is generally not the case when using a `Cell`. If you require interior mutability by reference, consider using `RefCell` which provides run-time checked mutable borrows through its `borrow_mut` method.
Use `map_or` instead of open-coding it

`@rustbot` modify labels +C-cleanup +T-compiler
Update rustversion to 1.0.5

1.0.4 was problematic for bootstrapping rustc on gentoo. See dtolnay/rustversion#28.
…r=m-ou-se

Update library tracking issue for libs-api rename.
…tichaut

Fix ICE with `#[repr(simd)]` on enum

This pull request fixes rust-lang#83505. `#[repr(simd)]` may only be applied to structs, which correctly causes `E0517` for the example given in rust-lang#83505, but the compiler attempts to recover from this error, which leads to an ICE later, when `.non_enum_variant()` is called on the `AdtDef`. I have added a check that prevents this from happening.
@rustbot rustbot added the rollup A PR which is a rollup label Jun 19, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=9 rollup=never

@bors
Copy link
Contributor

bors commented Jun 19, 2021

📌 Commit ad79aba has been approved by JohnTitor

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 19, 2021
@bors
Copy link
Contributor

bors commented Jun 19, 2021

⌛ Testing commit ad79aba with merge 9839f9c...

@bors
Copy link
Contributor

bors commented Jun 19, 2021

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing 9839f9c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 19, 2021
@bors bors merged commit 9839f9c into rust-lang:master Jun 19, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 19, 2021
@JohnTitor JohnTitor deleted the rollup-jjzupny branch June 19, 2021 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

10 participants