]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_closure_call.stderr
Update to `rustc 1.19.0-nightly (6a5fc9eec 2017-05-02)`
[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        ^^^^^^^^^ help: Try doing something like:  `42`
24
25 error: Try not to call a closure in the expression where it is declared.
26   --> $DIR/redundant_closure_call.rs:13:10
27    |
28 13 | \tlet k = (|m| m+1)(i);
29    | \t        ^^^^^^^^^^^^
30
31 error: Try not to call a closure in the expression where it is declared.
32   --> $DIR/redundant_closure_call.rs:15:6
33    |
34 15 | \tk = (|a,b| a*b)(1,5);
35    | \t    ^^^^^^^^^^^^^^^^
36
37 error: aborting due to 5 previous errors
38