async fn: 'static lifetime not inferred for Arc trait object #54974
Labels
A-async-await
Area: Async & Await
A-lifetimes
Area: Lifetimes / regions
AsyncAwait-Polish
Async-await issues that are part of the "polish" area
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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?The text was updated successfully, but these errors were encountered: