Skip to content

Tracking Issue for poll.ready()? #89780

Closed
@dtolnay

Description

@dtolnay

Feature gate: #![feature(poll_ready)]

This is a tracking issue for the core::task::Poll::ready method, which combined with ? potentially supplants the ready! macro of #70922.

- let val = ready!(fut.poll(cx));
+ let val = fut.poll(cx).ready()?;

Public API

// core::task

impl<T> Poll<T> {
    pub fn ready(self) -> Ready<T>;
}

pub struct Ready<T> {...}

impl<T> Try for Ready<T> {
    type Output = T;
    type Residual = Ready<Infallible>;
    ...
}

impl<T> FromResidual for Ready<T> {...}

impl<T> FromResidual<Ready<Infallible>> for Poll<T> {...}

impl<T> Debug for Ready<T> {...}

Steps / History

Unresolved Questions

  • ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions