-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed as not planned
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Lifetimes bounds added to returned impl Trait
does not seem to be considered by the compiler.
I would expect the above example to compile: wrap
is defined to return a 'static
Future, so why is the compiler saying that it should have the same lifetime as &self
?
The issue does not manifest when returning a concrete type like MapErr
or BoxFuture<'static, Reply>
,
Metadata
Metadata
Assignees
Labels
A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.