rust-clippy/clippy_tests/examples/redundant_closure_call.stderr
Oliver Schneider f889ba95d3 Fix ui tests
2017-07-21 10:40:23 +02:00

36 lines
1,018 B
Text

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