-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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
Follow up to #63507 (comment)
Include type arguments for traits when displaying impl Trait
. For example, the following:
error[E0282]: type annotations needed for `impl std::future::Future`
--> $DIR/cannot-infer-async-enabled-impl-trait-bindings.rs:14:9
|
LL | let fut = async {
| --- consider giving `fut` the explicit type `impl std::future::Future`, with the type parameters specified
LL | make_unit()?;
| ^^^^^^^^^^^^ cannot infer type
should be
error[E0282]: type annotations needed for `impl std::future::Future`
--> $DIR/cannot-infer-async-enabled-impl-trait-bindings.rs:14:9
|
LL | let fut = async {
| --- consider giving `fut` the explicit type `impl std::future::Future<Output=_>`, with the type parameters specified
LL | make_unit()?;
| ^^^^^^^^^^^^ cannot infer type
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.