]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/redundant_closure_call.stderr
iterate List by value
[rust.git] / tests / ui / redundant_closure_call.stderr
index e2865edc87051e824d12fff5f35d93147ec66b92..68c1416bb6b1a33ff731f9fa9895116248011966 100644 (file)
@@ -1,34 +1,28 @@
 error: Closure called just once immediately after it was declared
-  --> $DIR/redundant_closure_call.rs:15:2
+  --> $DIR/redundant_closure_call.rs:12:5
    |
-15 |  i = closure();
-   |  ^^^^^^^^^^^^^
+LL |     i = closure();
+   |     ^^^^^^^^^^^^^
    |
-   = note: `-D redundant-closure-call` implied by `-D warnings`
+   = note: `-D clippy::redundant-closure-call` implied by `-D warnings`
 
 error: Closure called just once immediately after it was declared
-  --> $DIR/redundant_closure_call.rs:18:2
+  --> $DIR/redundant_closure_call.rs:15:5
    |
-18 |  i = closure(3);
-   |  ^^^^^^^^^^^^^^
+LL |     i = closure(3);
+   |     ^^^^^^^^^^^^^^
 
 error: Try not to call a closure in the expression where it is declared.
- --> $DIR/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.
-  --> $DIR/redundant_closure_call.rs:10:14
+  --> $DIR/redundant_closure_call.rs:7:17
    |
-10 |  let mut k = (|m| m+1)(i);
-   |              ^^^^^^^^^^^^
+LL |     let mut k = (|m| m + 1)(i);
+   |                 ^^^^^^^^^^^^^^
 
 error: Try not to call a closure in the expression where it is declared.
-  --> $DIR/redundant_closure_call.rs:12:6
+  --> $DIR/redundant_closure_call.rs:9:9
    |
-12 |  k = (|a,b| a*b)(1,5);
-   |      ^^^^^^^^^^^^^^^^
+LL |     k = (|a, b| a * b)(1, 5);
+   |         ^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 5 previous errors
+error: aborting due to 4 previous errors