]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/suspicious_map.stderr
iterate List by value
[rust.git] / tests / ui / suspicious_map.stderr
index 434ea089fedf844ed675b16b70af35d1f1c9db94..e1b4ba40376f88d0904b96cf6c459e57bbbd56ee 100644 (file)
@@ -1,10 +1,11 @@
-error: Make sure you did not confuse `map` with `filter`.
+error: this call to `map()` won't have an effect on the call to `count()`
   --> $DIR/suspicious_map.rs:4:13
    |
 LL |     let _ = (0..3).map(|x| x + 2).count();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D clippy::suspicious-map` implied by `-D warnings`
+   = help: make sure you did not confuse `map` with `filter` or `for_each`
 
 error: aborting due to previous error