1 error: Closure called just once immediately after it was declared
2 --> redundant_closure_call.rs:15:2
7 = note: `-D redundant-closure-call` implied by `-D warnings`
9 error: Closure called just once immediately after it was declared
10 --> redundant_closure_call.rs:18:2
15 = note: `-D redundant-closure-call` implied by `-D warnings`
17 error: Try not to call a closure in the expression where it is declared.
18 --> redundant_closure_call.rs:7:10
20 7 | let a = (|| 42)();
21 | ^^^^^^^^^ help: Try doing something like: `42`
23 = note: `-D redundant-closure-call` implied by `-D warnings`
25 error: Try not to call a closure in the expression where it is declared.
26 --> redundant_closure_call.rs:10:14
28 10 | let mut k = (|m| m+1)(i);
31 = note: `-D redundant-closure-call` implied by `-D warnings`
33 error: Try not to call a closure in the expression where it is declared.
34 --> redundant_closure_call.rs:12:6
36 12 | k = (|a,b| a*b)(1,5);
39 = note: `-D redundant-closure-call` 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.