rust/tests/ui/redundant_closure_call.stderr
2017-08-01 17:54:21 +02:00

35 lines
999 B
Plaintext

error: Closure called just once immediately after it was declared
--> $DIR/redundant_closure_call.rs:15:2
|
15 | \ti = closure();
| \t^^^^^^^^^^^^^
|
= note: `-D redundant-closure-call` implied by `-D warnings`
error: Closure called just once immediately after it was declared
--> $DIR/redundant_closure_call.rs:18:2
|
18 | \ti = closure(3);
| \t^^^^^^^^^^^^^^
error: Try not to call a closure in the expression where it is declared.
--> $DIR/redundant_closure_call.rs:7:10
|
7 | \tlet a = (|| 42)();
| \t ^^^^^^^^^ 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:10:14
|
10 | \tlet mut k = (|m| m+1)(i);
| \t ^^^^^^^^^^^^
error: Try not to call a closure in the expression where it is declared.
--> $DIR/redundant_closure_call.rs:12:6
|
12 | \tk = (|a,b| a*b)(1,5);
| \t ^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors