Open
Description
The following currently works:
use pin_project::pin_project;
use core::future::Future;
#[pin_project]
struct Pinned<A: Future, B: Future>(#[pin] A, #[pin] B);
But this doesn't:
use pin_project::pin_project;
use core::future::Future;
#[pin_project]
struct Pinned<A: Future, B: Future> {
futures: (#[pin] A, #[pin] B),
}
So instead we now have to do:
use pin_project::pin_project;
use core::future::Future;
#[pin_project]
struct Futures<A: Future, B: Future> (#[pin] A, #[pin] B);
#[pin_project]
struct Pinned<A: Future, B: Future> {
futures: Futures<A, B>,
}
We ran into some issues with this in yoshuawuyts/futures-concurrency#74. I'm not sure how feasible this would be to provide, but being able to pin-project into individual enum fields would save us from having to generate an intermediate struct. So I figured I'd raise it here; hope that's alright!