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

Implement Future for Option<F> #109691

Closed
wants to merge 2 commits into from
Closed

Conversation

nvzqz
Copy link
Contributor

@nvzqz nvzqz commented Mar 28, 2023

When working with an Option<F: Future> in an async context, one may want to defer the handling of None. This is currently cumbersome/verbose to do.

ACP: rust-lang/libs-team#197

@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2023

r? @joshtriplett

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 28, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@nvzqz
Copy link
Contributor Author

nvzqz commented Mar 28, 2023

@rustbot label +T-libs-api -T-libs

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 28, 2023
@Nilstrieb Nilstrieb added S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 28, 2023
@@ -2293,6 +2296,19 @@ impl SpecOptionPartialEq for cmp::Ordering {
}
}

#[stable(feature = "option_future", since = "CURRENT_RUSTC_VERSION")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this include a doctest?

@bors
Copy link
Contributor

bors commented May 1, 2023

☔ The latest upstream changes (presumably #111040) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 1, 2023
@dtolnay dtolnay added the needs-fcp This change is insta-stable, so needs a completed FCP to proceed. label Sep 28, 2023
@Dylan-DPC Dylan-DPC removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 21, 2023
@joshtriplett
Copy link
Member

r? libs-api

@rustbot rustbot assigned Amanieu and unassigned joshtriplett Feb 11, 2024
@yoshuawuyts
Copy link
Member

yoshuawuyts commented Feb 12, 2024

@rustbot +I-async-nominated

@traviscross
Copy link
Contributor

@rustbot labels +I-async-nominated +WG-async

Let's discuss this in the async WG.

(Please mark issues such as this one WG-async and nominate them for the async working group.)

@traviscross traviscross added A-async-await Area: Async & Await WG-async Working group: Async & await I-async-nominated The issue / PR has been nominated for discussion during an async working group meeting. labels Feb 12, 2024
@traviscross
Copy link
Contributor

We discussed this in the WG-async call today.

Our consensus was to recommend this be closed.

Further details are here.

@dtolnay dtolnay assigned dtolnay and unassigned Amanieu Feb 13, 2024
@dtolnay
Copy link
Member

dtolnay commented Feb 13, 2024

@rfcbot fcp close

@rfcbot
Copy link

rfcbot commented Feb 13, 2024

Team member @dtolnay has proposed to close this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-close This PR / issue is in PFCP or FCP with a disposition to close it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Feb 13, 2024
@rfcbot
Copy link

rfcbot commented Feb 13, 2024

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Feb 13, 2024
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Feb 23, 2024
@rfcbot
Copy link

rfcbot commented Feb 23, 2024

The final comment period, with a disposition to close, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@dtolnay
Copy link
Member

dtolnay commented Feb 23, 2024

Thank you anyway for this proposal!

@dtolnay dtolnay closed this Feb 23, 2024
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await disposition-close This PR / issue is in PFCP or FCP with a disposition to close it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-async-nominated The issue / PR has been nominated for discussion during an async working group meeting. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. WG-async Working group: Async & await
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet