unnecessary_lazy_evaluations
is suggested for async closure
#14578
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Uh oh!
There was an error while loading. Please reload this page.
Summary
For async closures, the lint
unnecessary_lazy_evaluations
is suggested even if that is necessary.Clearly, the resulting type will change from
impl Future<Output = T>
to justT
, this causes compile error.Lint Name
unnecessary_lazy_evaluations
Reproducer
For this code,
Clippy suggests this, but this does not compile.
If I use an async block instead, it works well (no suggestion).
Version
Additional Labels
@rustbot label +I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: