2017-05-17 12:19:44 +00:00
|
|
|
error: Closure called just once immediately after it was declared
|
2017-05-17 15:51:35 +00:00
|
|
|
--> redundant_closure_call.rs:15:2
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
|
|
|
15 | i = closure();
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D redundant-closure-call` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: Closure called just once immediately after it was declared
|
2017-05-17 15:51:35 +00:00
|
|
|
--> redundant_closure_call.rs:18:2
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
|
|
|
18 | i = closure(3);
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D redundant-closure-call` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: Try not to call a closure in the expression where it is declared.
|
2017-05-17 15:51:35 +00:00
|
|
|
--> redundant_closure_call.rs:7:10
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
|
|
|
7 | let a = (|| 42)();
|
|
|
|
| ^^^^^^^^^ help: Try doing something like: `42`
|
|
|
|
|
|
|
|
|
= note: `-D redundant-closure-call` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: Try not to call a closure in the expression where it is declared.
|
2017-05-17 15:51:35 +00:00
|
|
|
--> redundant_closure_call.rs:10:14
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
|
|
|
10 | let mut k = (|m| m+1)(i);
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D redundant-closure-call` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: Try not to call a closure in the expression where it is declared.
|
2017-05-17 15:51:35 +00:00
|
|
|
--> redundant_closure_call.rs:12:6
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
|
|
|
12 | k = (|a,b| a*b)(1,5);
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D redundant-closure-call` implied by `-D warnings`
|
|
|
|
|
2017-05-26 07:21:54 +00:00
|
|
|
error: aborting due to previous error(s)
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
To learn more, run the command again with --verbose.
|