Add ui test

This commit is contained in:
Jeremy Stucki 2019-08-15 22:56:27 +02:00
parent f4f31a4ff4
commit 72e4e4ac6c
No known key found for this signature in database
GPG Key ID: 8F548A5A2ED13F58
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#![warn(clippy::suspicious_map)]
fn main() {
let _ = (0..3).map(|x| x + 2).count();
}

View File

@ -0,0 +1,10 @@
error: Make sure you did not confuse `map` with `filter`.
--> $DIR/suspicious_map.rs:4:13
|
LL | let _ = (0..3).map(|x| x + 2).count();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::suspicious-map` implied by `-D warnings`
error: aborting due to previous error