-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsAsyncAwait-PolishAsync-await issues that are part of the "polish" areaAsync-await issues that are part of the "polish" areaC-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
Playground link to reproduce: https://play.rust-lang.org/?gist=697ecc0c55cbf30bee0fb2d87736f704&version=nightly&mode=debug&edition=2018
Changing the suggested type to Arc<SomeTrait + 'static>
fixes the compiler error.
Having to manually specify this does not seem intentional. Perhaps this 'static
lifetime should be automatically inferred?
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsAsyncAwait-PolishAsync-await issues that are part of the "polish" areaAsync-await issues that are part of the "polish" areaC-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.