]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_closure_call.stderr
remove all //~ from tests
[rust.git] / tests / ui / redundant_closure_call.stderr
1 error: Closure called just once immediately after it was declared
2   --> $DIR/redundant_closure_call.rs:18:2
3    |
4 18 | \ti = closure();
5    | \t^^^^^^^^^^^^^
6    |
7 note: lint level defined here
8   --> $DIR/redundant_closure_call.rs:4:9
9    |
10 4  | #![deny(redundant_closure_call)]
11    |         ^^^^^^^^^^^^^^^^^^^^^^
12
13 error: Closure called just once immediately after it was declared
14   --> $DIR/redundant_closure_call.rs:21:2
15    |
16 21 | \ti = closure(3);
17    | \t^^^^^^^^^^^^^^
18
19 error: Try not to call a closure in the expression where it is declared.
20  --> $DIR/redundant_closure_call.rs:7:10
21   |
22 7 | \tlet a = (|| 42)();
23   | \t        ^^^^^^^^^
24   |
25 help: Try doing something like: 
26   | \tlet a = 42;
27
28 error: Try not to call a closure in the expression where it is declared.
29   --> $DIR/redundant_closure_call.rs:13:10
30    |
31 13 | \tlet k = (|m| m+1)(i);
32    | \t        ^^^^^^^^^^^^
33
34 error: Try not to call a closure in the expression where it is declared.
35   --> $DIR/redundant_closure_call.rs:15:6
36    |
37 15 | \tk = (|a,b| a*b)(1,5);
38    | \t    ^^^^^^^^^^^^^^^^
39
40 error: aborting due to 5 previous errors
41