Update src/future/timeout.rs

Co-Authored-By: Stjepan Glavina <stjepang@gmail.com>
This commit is contained in:
Yoshua Wuyts 2019-09-18 12:43:34 +02:00 committed by GitHub
parent 6b76fb1308
commit 2964e72b00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ use crate::task::{Context, Poll};
/// # Ok(()) }) }
/// ```
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[cfg(feature = "unstable")]
#[cfg(any(feature = "unstable", feature = "docs"))]
pub async fn timeout<F, T>(dur: Duration, f: F) -> Result<T, TimeoutError>
where
F: Future<Output = T>,