2017-08-01 10:54:21 -05:00
|
|
|
error: Closure called just once immediately after it was declared
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/redundant_closure_call.rs:12:5
|
2017-08-01 10:54:21 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | i = closure();
|
2017-12-07 04:20:48 -06:00
|
|
|
| ^^^^^^^^^^^^^
|
2017-08-01 10:54:21 -05:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::redundant-closure-call` implied by `-D warnings`
|
2017-08-01 10:54:21 -05:00
|
|
|
|
|
|
|
error: Closure called just once immediately after it was declared
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/redundant_closure_call.rs:15:5
|
2017-08-01 10:54:21 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | i = closure(3);
|
2017-12-07 04:20:48 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-08-01 10:54:21 -05:00
|
|
|
|
|
|
|
error: Try not to call a closure in the expression where it is declared.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/redundant_closure_call.rs:7:17
|
2017-08-01 10:54:21 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | let mut k = (|m| m + 1)(i);
|
2018-12-09 23:27:19 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
2017-08-01 10:54:21 -05:00
|
|
|
|
|
|
|
error: Try not to call a closure in the expression where it is declared.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/redundant_closure_call.rs:9:9
|
2017-08-01 10:54:21 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | k = (|a, b| a * b)(1, 5);
|
2018-12-09 23:27:19 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
2017-08-01 10:54:21 -05:00
|
|
|
|
2019-09-25 11:30:27 -05:00
|
|
|
error: aborting due to 4 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|