Closed
Description
Summary
When casting the result of a function to the same type, clippy::unnecessary_cast
doesn't warn
Lint Name
clippy::unnecessary_cast
Reproducer
I tried this code:
fn foo() -> f32 { 0. }
fn main() {
let num = foo() as f32;
}
I expected to see this happen: Warning that the cast is unnecessary
Instead, this happened: No warning
Version
No response