-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.

Description
We currently have the following blanket impls:
impl<F: ?Sized + Future + Unpin> Future for &mut F
{ ... }
impl<F: ?Sized + Future + Unpin> Future for Box<F>
{ ... }
impl<F: Future> Future for AssertUnwindSafe<F>
{ ... }
impl<P> Future for Pin<P>
where
P: Unpin + ops::DerefMut,
P::Target: Future,
{ ... }
All of these blanket impls are on types that deref to something that implements Future
. But then there are similar types that don't have a blanket Future
implementation - for example, MutexGuard
.
I wonder if these impls are necessary in practice if fut.await
will auto-deref fut
to a value that implements Future
. I'm opening this issue just to double-check whether we really want to stabilize those blanket impls.
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.