]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_closure_call.stderr
Auto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix
[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:21:5
3    |
4 LL |     i = closure();
5    |     ^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::redundant-closure-call` implied by `-D warnings`
8
9 error: Closure called just once immediately after it was declared
10   --> $DIR/redundant_closure_call.rs:24:5
11    |
12 LL |     i = closure(3);
13    |     ^^^^^^^^^^^^^^
14
15 error: Try not to call a closure in the expression where it is declared.
16   --> $DIR/redundant_closure_call.rs:13:13
17    |
18 LL |     let a = (|| 42)();
19    |             ^^^^^^^^^ help: Try doing something like: : `42`
20
21 error: Try not to call a closure in the expression where it is declared.
22   --> $DIR/redundant_closure_call.rs:16:17
23    |
24 LL |     let mut k = (|m| m + 1)(i);
25    |                 ^^^^^^^^^^^^^^
26
27 error: Try not to call a closure in the expression where it is declared.
28   --> $DIR/redundant_closure_call.rs:18:9
29    |
30 LL |     k = (|a, b| a * b)(1, 5);
31    |         ^^^^^^^^^^^^^^^^^^^^
32
33 error: aborting due to 5 previous errors
34