-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
type inference doesn't work in async fn that return Box<dyn SomeTrait> #60424
Copy link
Copy link
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-inferenceArea: Type inferenceArea: Type inferenceAsyncAwait-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.
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-inferenceArea: Type inferenceArea: Type inferenceAsyncAwait-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
i have following fn that works completly fine:
if i try trivialy make it async just by adding
asynckeyword i get build error:i can work around this by defining types of variables explicitly:
but for obvious reasons this is not as nice as sync version
maybe related to #60414 ?
rustc --version:rustc 1.36.0-nightly (00859e3e6 2019-04-29)