Arnavion / derive-error-chain

A Macros 1.1 implementation of https://crates.io/crates/error-chain
19 stars 1 forks source link

Future alias? #14

Closed Arnavion closed 7 years ago

Arnavion commented 7 years ago
pub type Future<T> = ::futures::Future<Item = T, Error = Error>;

like the Result alias.

Opt-in via toplevel #[error_chain(future)] / #[error_chain(future = "Future")] attribute, of course.

Arnavion commented 7 years ago

Not possible for now.

error[E0404]: expected trait, found type alias `Future`
type aliases cannot be used for traits

rust-lang/rust issue 41517 tracks the feature.