rust-clippy/tests/ui/redundant_closure_call.stderr
2018-12-10 08:22:07 +01:00

34 lines
1 KiB
Text

error: Closure called just once immediately after it was declared
--> $DIR/redundant_closure_call.rs:21:5
|
21 | i = closure();
| ^^^^^^^^^^^^^
|
= note: `-D clippy::redundant-closure-call` implied by `-D warnings`
error: Closure called just once immediately after it was declared
--> $DIR/redundant_closure_call.rs:24:5
|
24 | i = closure(3);
| ^^^^^^^^^^^^^^
error: Try not to call a closure in the expression where it is declared.
--> $DIR/redundant_closure_call.rs:13:13
|
13 | let a = (|| 42)();
| ^^^^^^^^^ help: Try doing something like: : `42`
error: Try not to call a closure in the expression where it is declared.
--> $DIR/redundant_closure_call.rs:16:17
|
16 | let mut k = (|m| m + 1)(i);
| ^^^^^^^^^^^^^^
error: Try not to call a closure in the expression where it is declared.
--> $DIR/redundant_closure_call.rs:18:9
|
18 | k = (|a, b| a * b)(1, 5);
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors