rust-clippy/tests/ui/suspicious_map.stderr

21 lines
766 B
Text
Raw Normal View History

2019-08-18 14:49:11 +00:00
error: this call to `map()` won't have an effect on the call to `count()`
2019-08-15 20:56:27 +00:00
--> $DIR/suspicious_map.rs:4:13
|
LL | let _ = (0..3).map(|x| x + 2).count();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect`
2022-09-22 16:04:22 +00:00
= note: `-D clippy::suspicious-map` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::suspicious_map)]`
2019-08-15 20:56:27 +00:00
error: this call to `map()` won't have an effect on the call to `count()`
--> $DIR/suspicious_map.rs:8:13
|
LL | let _ = (0..3).map(f).count();
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect`
error: aborting due to 2 previous errors
2019-08-15 20:56:27 +00:00