clean tests/ui/redundant_closure_call.rs

Cleaning the empty lines for clarity.
This commit is contained in:
Luis de Bethencourt 2017-05-11 15:36:28 +01:00
parent 169f35712c
commit 7d2e0cb435
2 changed files with 8 additions and 12 deletions

View File

@ -6,9 +6,6 @@
fn main() { fn main() {
let a = (|| 42)(); let a = (|| 42)();
let mut i = 1; let mut i = 1;
let k = (|m| m+1)(i); let k = (|m| m+1)(i);
@ -22,4 +19,3 @@ fn main() {
i = closure(4); i = closure(4);
} }

View File

@ -1,7 +1,7 @@
error: Closure called just once immediately after it was declared error: Closure called just once immediately after it was declared
--> $DIR/redundant_closure_call.rs:18:2 --> $DIR/redundant_closure_call.rs:15:2
| |
18 | \ti = closure(); 15 | \ti = closure();
| \t^^^^^^^^^^^^^ | \t^^^^^^^^^^^^^
| |
note: lint level defined here note: lint level defined here
@ -11,9 +11,9 @@ note: lint level defined here
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
error: Closure called just once immediately after it was declared error: Closure called just once immediately after it was declared
--> $DIR/redundant_closure_call.rs:21:2 --> $DIR/redundant_closure_call.rs:18:2
| |
21 | \ti = closure(3); 18 | \ti = closure(3);
| \t^^^^^^^^^^^^^^ | \t^^^^^^^^^^^^^^
error: Try not to call a closure in the expression where it is declared. error: Try not to call a closure in the expression where it is declared.
@ -23,15 +23,15 @@ error: Try not to call a closure in the expression where it is declared.
| \t ^^^^^^^^^ help: Try doing something like: `42` | \t ^^^^^^^^^ help: Try doing something like: `42`
error: Try not to call a closure in the expression where it is declared. error: Try not to call a closure in the expression where it is declared.
--> $DIR/redundant_closure_call.rs:13:10 --> $DIR/redundant_closure_call.rs:10:10
| |
13 | \tlet k = (|m| m+1)(i); 10 | \tlet k = (|m| m+1)(i);
| \t ^^^^^^^^^^^^ | \t ^^^^^^^^^^^^
error: Try not to call a closure in the expression where it is declared. error: Try not to call a closure in the expression where it is declared.
--> $DIR/redundant_closure_call.rs:15:6 --> $DIR/redundant_closure_call.rs:12:6
| |
15 | \tk = (|a,b| a*b)(1,5); 12 | \tk = (|a,b| a*b)(1,5);
| \t ^^^^^^^^^^^^^^^^ | \t ^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors error: aborting due to 5 previous errors