1 error: redundant closure found
4 7 | let a = Some(1u8).map(|a| foo(a));
5 | ^^^^^^^^^^ help: remove closure as shown: `foo`
7 = note: `-D redundant-closure` implied by `-D warnings`
9 error: redundant closure found
13 | ^^^^^^^^^^ help: remove closure as shown: `foo`
15 = note: `-D redundant-closure` implied by `-D warnings`
17 error: redundant closure found
20 9 | let c = Some(1u8).map(|a| {1+2; foo}(a));
21 | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `{1+2; foo}`
23 = note: `-D redundant-closure` implied by `-D warnings`
25 error: this expression borrows a reference that is immediately dereferenced by the compiler
28 11 | all(&[1, 2, 3], &&2, |x, y| below(x, y)); //is adjusted
31 = note: `-D needless-borrow` implied by `-D warnings`
33 error: redundant closure found
36 18 | let e = Some(1u8).map(|a| generic(a));
37 | ^^^^^^^^^^^^^^ help: remove closure as shown: `generic`
39 = note: `-D redundant-closure` implied by `-D warnings`
41 error: aborting due to previous error(s)
43 error: Could not compile `clippy_tests`.
45 To learn more, run the command again with --verbose.