Skip to content

Rollup of 10 pull requests - #87569

Merged
bors merged 29 commits into
rust-lang:masterfrom
JohnTitor:rollup-7ydfetw
Jul 29, 2021
Merged

Rollup of 10 pull requests#87569
bors merged 29 commits into
rust-lang:masterfrom
JohnTitor:rollup-7ydfetw

Conversation

@JohnTitor

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jonhooand others added 29 commits March 28, 2021 12:37
The `Unpin` bound was originally added in rust-lang#56939 following the
recommendation of @withoutboats in
rust-lang#55766 (comment)
That comment does not give explicit justification for why the bound
should be added. The relevant context was:
> [ ] Remove `impl<P> Unpin for Pin<P>`
>
> This impl is not justified by our standard justification for unpin
> impls: there is no pointer direction between `Pin<P>` and `P`. Its
> usefulness is covered by the impls for pointers themselves.
>
> This futures impl (link to the impl changed in this PR) will need to
> change to add a `P: Unpin` bound.
The decision to remove the unconditional impl of `Unpin for Pin` is
sound (these days there is just an auto-impl for when `P: Unpin`). But,
I think the decision to also add the `Unpin` bound for `impl Future` may
have been unnecessary. Or if that's not the case, I'd be very interested
to have the argument for why written down somewhere. The bound _appears_
to not be needed, since the presence of a `Pin<P>` should indicate that
it's safe to project to `Pin<&mut P::Target>` just like for
`Pin::as_mut`.
Co-authored-by: Ralf Jung <post@ralfj.de>
Add `mkdir` to `create_dir`, `rmdir` to `remove_dir`.
…=m-ou-se
Stabilize core::task::ready!
_Tracking issue: https://github.com/rust-lang/rust/issues/70922_
This PR stabilizes the `task::ready!` macro. Similar to rust-lang#80886, this PR was waiting on rust-lang#74355 to be fixed.
The `task::ready!` API has existed in the futures ecosystem for several years, and was added on nightly last year in rust-lang#70817. The motivation for this macro is the same as it was back then: virtually every single manual future implementation makes use of this; so much so that it's one of the few things included in the [futures-core](https://docs.rs/futures-core/0.3.12/futures_core) library.
r? ``@tmandry``
cc/ ``@rust-lang/wg-async-foundations`` ``@rust-lang/libs``
## Example
```rust
use core::task::{Context, Poll};
use core::future::Future;
use core::pin::Pin;
async fn get_num() -> usize {
42
}
pub fn do_poll(cx: &mut Context<'_>) -> Poll<()> {
let mut f = get_num();
let f = unsafe { Pin::new_unchecked(&mut f) };
let num = ready!(f.poll(cx));
// ... use num
Poll::Ready(())
}
```
… r=m-ou-se
Remove P: Unpin bound on impl Future for Pin
We can safely produce a `Pin<&mut P::Target>` without moving out of the `Pin` by using `Pin::as_mut` directly.
The `Unpin` bound was originally added in rust-lang#56939 following the recommendation of ``@withoutboats`` in rust-lang#55766 (comment)
That comment does not give explicit justification for why the bound should be added. The relevant context was:
> [ ] Remove `impl<P> Unpin for Pin<P>`
>
> This impl is not justified by our standard justification for unpin impls: there is no pointer direction between `Pin<P>` and `P`. Its usefulness is covered by the impls for pointers themselves.
>
> This futures impl (link to the impl changed in this PR) will need to change to add a `P: Unpin` bound.
The decision to remove the unconditional impl of `Unpin for Pin` is sound (these days there is just an auto-impl for when `P: Unpin`). But, I think the decision to also add the `Unpin` bound for `impl Future` may have been unnecessary. Or if that's not the case, I'd be very interested to have the argument for why written down somewhere. The bound _appears_ to not be needed, as demonstrated by the change requiring no unsafe code and by the existence of `Pin::as_mut`.
Add doc aliases to fs.rs
Add aliases for create_dir, create_dir_all, remove_dir, remove_dir_all
…oc, r=jyn514
Add support for tuple struct field documentation
Fixesrust-lang#42615.
This is rust-lang#80320 updated to new codebase and with added tests.
Part of rust-lang#83255.
cc ```@camelid``` (since you were involved on the original PR).
r? ```@jyn514```
…rk-Simulacrum
Integrate context into the memorial to Anna
This came up after I reviewed rust-lang#87298, but I didn't propose this in time before that PR was merged.
If y'all feel this is too much churn on the file, no worries, feel free to close, but I felt this was a more fitting integration of the memorial into the test suite.
CC ``@boringcactus.``
…oli-obk
Don't run MIR unsafeck at all when using `-Zthir-unsafeck`
I don't know how I missed this :D
r? ``@oli-obk``
…r=Mark-Simulacrum
Add `CI_ONLY_WHEN_CHANNEL` and run `x86_64-gnu-stable` only on nightly
Backporting a commit made on rust-lang#87508. cc ``@Mark-Simulacrum``
Use backticks when referring to `core::future::Ready` in panic message
@rustbotrustbot added the rollup A PR which is a rollup label Jul 28, 2021
@JohnTitor

Copy link
Copy Markdown
MemberAuthor

@bors r+ p=10 rollup=never

@bors

bors commented Jul 28, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 6c4888a has been approved by JohnTitor

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 28, 2021
@bors

bors commented Jul 28, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 6c4888a with merge 4533be9...

@bors

bors commented Jul 29, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing 4533be9 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jul 29, 2021
@bors
bors merged commit 4533be9 into rust-lang:masterJul 29, 2021
@rustbotrustbot added this to the 1.56.0 milestone Jul 29, 2021
@rust-highfive

Copy link
Copy Markdown
Contributor

📣 Toolstate changed by #87569!

Tested on commit 4533be9.
Direct link to PR: #87569

🎉 rls on windows: test-fail → test-pass (cc @Xanewok).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jul 29, 2021
Tested on commit rust-lang/rust@4533be9.
Direct link to PR: <rust-lang/rust#87569>
🎉 rls on windows: test-fail → test-pass (cc @Xanewok).
@JohnTitor
JohnTitor deleted the rollup-7ydfetw branch July 29, 2021 07:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.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.

12 participants

@JohnTitor@bors@rust-highfive@rustbot@jonhoo@yoshuawuyts@GuillaumeGomez@midgleyc@LeSeulArtichaut@emilyalbini@m-ou-se@D1mon