Closed
Description
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
- Add
Poll::ready
and revert stabilization oftask::ready!
#89651 - Remove unstable
Poll::ready
libs-team#214 - Remove unstable
Poll::ready
#107060
Unresolved Questions
- ?