unnecessary_lazy_evaluations
suggestions cause type inferrence errors
#6240
Labels
C-bug
Category: Clippy is not doing the correct thing
I tried this code (https://github.com/rust-lang/rust/blob/0da6d42f297642a60f2640ec313b879b376b9ad8/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs#L539):
I expected to see this happen: Not entirely sure ... maybe the lint shouldn't fire at all here, since there's an explicit type annotation for a unit struct?
Instead, this happened: Since
ErrorReported
is helping inferrence, inference breaks once it's gone.Meta
cargo clippy -V
: clippy 0.0.212 (ffa2e7a 2020-10-24)The text was updated successfully, but these errors were encountered: