]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/redundant_closure_call.stderr
Fix the test suite after cargo update
[rust.git] / clippy_tests / examples / redundant_closure_call.stderr
1 error: Closure called just once immediately after it was declared
2   --> redundant_closure_call.rs:15:2
3    |
4 15 |    i = closure();
5    |    ^^^^^^^^^^^^^
6    |
7    = note: `-D redundant-closure-call` implied by `-D warnings`
8
9 error: Closure called just once immediately after it was declared
10   --> redundant_closure_call.rs:18:2
11    |
12 18 |    i = closure(3);
13    |    ^^^^^^^^^^^^^^
14    |
15    = note: `-D redundant-closure-call` implied by `-D warnings`
16
17 error: Try not to call a closure in the expression where it is declared.
18  --> redundant_closure_call.rs:7:10
19   |
20 7 |     let a = (|| 42)();
21   |             ^^^^^^^^^ help: Try doing something like:  `42`
22   |
23   = note: `-D redundant-closure-call` implied by `-D warnings`
24
25 error: Try not to call a closure in the expression where it is declared.
26   --> redundant_closure_call.rs:10:14
27    |
28 10 |    let mut k = (|m| m+1)(i);
29    |                ^^^^^^^^^^^^
30    |
31    = note: `-D redundant-closure-call` implied by `-D warnings`
32
33 error: Try not to call a closure in the expression where it is declared.
34   --> redundant_closure_call.rs:12:6
35    |
36 12 |    k = (|a,b| a*b)(1,5);
37    |        ^^^^^^^^^^^^^^^^
38    |
39    = note: `-D redundant-closure-call` implied by `-D warnings`
40
41 error: aborting due to previous error(s)
42
43
44 To learn more, run the command again with --verbose.