1 error: redundant closure found
2 --> examples/eta.rs:7:27
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
10 --> examples/eta.rs:8:10
13 | ^^^^^^^^^^ help: remove closure as shown: `foo`
15 = note: `-D redundant-closure` implied by `-D warnings`
17 error: redundant closure found
18 --> examples/eta.rs:9:27
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
26 --> examples/eta.rs:11:21
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
34 --> examples/eta.rs:18:27
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 5 previous errors
43 error: Could not compile `clippy_tests`.
45 To learn more, run the command again with --verbose.