-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 10 pull requests #87569
Merged
Merged
Rollup of 10 pull requests #87569
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 `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>
…uple for tuple structs in enums
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
fix example code for E0617 Closes rust-lang#86908
…oc, r=jyn514 Add support for tuple struct field documentation Fixes rust-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.``
Add long explanation for E0498 Helps with rust-lang#61137
…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
@bors r+ p=10 rollup=never |
📌 Commit 6c4888a has been approved by |
bors
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
☀️ Test successful - checks-actions |
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).
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.
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:
-Zthir-unsafeck
#87527 (Don't run MIR unsafeck at all when using-Zthir-unsafeck
)CI_ONLY_WHEN_CHANNEL
and runx86_64-gnu-stable
only on nightly #87550 (AddCI_ONLY_WHEN_CHANNEL
and runx86_64-gnu-stable
only on nightly)core::future::Ready
in panic message #87565 (Use backticks when referring tocore::future::Ready
in panic message)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup