1 error: redundant closure found
4 7 | let a = Some(1u8).map(|a| foo(a));
5 | ^^^^^^^^^^ help: remove closure as shown: `foo`
7 note: lint level defined here
10 4 | #![deny(redundant_closure)]
13 error: redundant closure found
17 | ^^^^^^^^^^ help: remove closure as shown: `foo`
19 error: redundant closure found
22 9 | let c = Some(1u8).map(|a| {1+2; foo}(a));
23 | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `{1+2; foo}`
25 warning: 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: #[warn(needless_borrow)] on by default
33 error: redundant closure found
36 18 | let e = Some(1u8).map(|a| generic(a));
37 | ^^^^^^^^^^^^^^ help: remove closure as shown: `generic`
39 error: aborting due to 4 previous errors