diff --git a/tokio-async-await/README.md b/tokio-async-await/README.md index 53fe6134e..3ed1f2a14 100644 --- a/tokio-async-await/README.md +++ b/tokio-async-await/README.md @@ -8,7 +8,8 @@ guarantees. You are living on the edge here.** ## Usage -To use this crate, you need to start with a Rust 2018 edition crate. +To use this crate, you need to start with a Rust 2018 edition crate, with rustc +1.33.0-nightly or later. Add this to your `Cargo.toml`: diff --git a/tokio-async-await/src/compat/backward.rs b/tokio-async-await/src/compat/backward.rs index b4e725472..53a3fdf5a 100644 --- a/tokio-async-await/src/compat/backward.rs +++ b/tokio-async-await/src/compat/backward.rs @@ -19,7 +19,7 @@ pub struct Compat(Pin>); impl Compat { /// Create a new `Compat` backed by `future`. pub fn new(future: T) -> Compat { - Compat(Box::pinned(future)) + Compat(Box::pin(future)) } } diff --git a/tokio-async-await/src/lib.rs b/tokio-async-await/src/lib.rs index 8d4915b9d..b06b5b7e9 100644 --- a/tokio-async-await/src/lib.rs +++ b/tokio-async-await/src/lib.rs @@ -5,7 +5,6 @@ async_await, await_macro, futures_api, - pin, )] #![doc(html_root_url = "https://docs.rs/tokio-async-await/0.1.4")]