diff --git a/actix-web/src/extract.rs b/actix-web/src/extract.rs index 1b2f0bd19..684afb0aa 100644 --- a/actix-web/src/extract.rs +++ b/actix-web/src/extract.rs @@ -67,6 +67,10 @@ pub trait FromRequest: Sized { type Error: Into; /// Future that resolves to a Self. + /// + /// To refer to the type of an async function or block here, you have two options. + /// The first is to use a boxed future such as `futures::future::BoxFuture`. This works on stable and nightly. + /// The second is to use `impl Future`, which requires `#![feature(type_alias_impl_trait)]` so only works on nightly. type Future: Future>; /// Create a Self from request parts asynchronously.