71 lines
2.8 KiB
Plaintext
71 lines
2.8 KiB
Plaintext
error: non-binding let on a type that implements `Drop`
|
|
--> $DIR/map_identity.rs:8:5
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(not_identity).map(|x| return x).collect();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `#[deny(clippy::let_underscore_drop)]` on by default
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: unnecessary map of the identity function
|
|
--> $DIR/map_identity.rs:8:47
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(not_identity).map(|x| return x).collect();
|
|
| ^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
|
= note: `-D clippy::map-identity` implied by `-D warnings`
|
|
|
|
error: non-binding let on a type that implements `Drop`
|
|
--> $DIR/map_identity.rs:9:5
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(std::convert::identity).map(|y| y).collect();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: unnecessary map of the identity function
|
|
--> $DIR/map_identity.rs:9:57
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(std::convert::identity).map(|y| y).collect();
|
|
| ^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
error: unnecessary map of the identity function
|
|
--> $DIR/map_identity.rs:9:29
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(std::convert::identity).map(|y| y).collect();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
error: unnecessary map of the identity function
|
|
--> $DIR/map_identity.rs:10:32
|
|
|
|
|
LL | let _: Option<u8> = Some(3).map(|x| x);
|
|
| ^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
error: unnecessary map of the identity function
|
|
--> $DIR/map_identity.rs:11:36
|
|
|
|
|
LL | let _: Result<i8, f32> = Ok(-3).map(|x| {
|
|
| ____________________________________^
|
|
LL | | return x;
|
|
LL | | });
|
|
| |______^ help: remove the call to `map`
|
|
|
|
error: non-binding let on a type that implements `Drop`
|
|
--> $DIR/map_identity.rs:15:5
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(|x| 2 * x).collect();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a type that implements `Drop`
|
|
--> $DIR/map_identity.rs:16:5
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(not_identity).map(|x| return x - 4).collect();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: aborting due to 9 previous errors
|
|
|