When needing type annotation do not suggest using impl Trait
or closure
#63504
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-inference
Area: Type inference
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Subset of #63502
When encountering
Do not suggest "consider giving
fut
the explicit typeimpl std::future::Future
, with the type parameters specified ", as introduced in #61361, when encounteringimpl Trait
:rust/src/librustc/infer/error_reporting/need_type_info.rs
Lines 140 to 169 in 60960a2
Also, the case for closures (CC #46680):
The text was updated successfully, but these errors were encountered: