Skip to content

async fn: 'static lifetime not inferred for Arc trait object #54974

Closed
@inodentry

Description

@inodentry

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 & AwaitA-lifetimesArea: Lifetimes / regionsAsyncAwait-PolishAsync-await issues that are part of the "polish" areaC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions