]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/unit_arg.stderr
iterate List by value
[rust.git] / tests / ui / unit_arg.stderr
index e1845c0c0eabf1032e13fe3123b22bdd745f51df..21ccc684ea9de9e30944abba009a9ce6958f4e5a 100644 (file)
@@ -1,67 +1,78 @@
 error: passing a unit value to a function
-  --> $DIR/unit_arg.rs:25:9
+  --> $DIR/unit_arg.rs:24:9
    |
-25 |     foo({});
+LL |     foo({});
    |         ^^
    |
    = note: `-D clippy::unit-arg` implied by `-D warnings`
 help: if you intended to pass a unit value, use a unit literal instead
    |
-25 |     foo(());
+LL |     foo(());
    |         ^^
 
 error: passing a unit value to a function
-  --> $DIR/unit_arg.rs:26:9
+  --> $DIR/unit_arg.rs:25:9
+   |
+LL |       foo({
+   |  _________^
+LL | |         1;
+LL | |     });
+   | |_____^
    |
-26 |     foo({ 1; });
-   |         ^^^^^^
 help: if you intended to pass a unit value, use a unit literal instead
    |
-26 |     foo(());
+LL |     foo(());
    |         ^^
 
 error: passing a unit value to a function
-  --> $DIR/unit_arg.rs:27:9
+  --> $DIR/unit_arg.rs:28:9
    |
-27 |     foo(foo(1));
+LL |     foo(foo(1));
    |         ^^^^^^
+   |
 help: if you intended to pass a unit value, use a unit literal instead
    |
-27 |     foo(());
+LL |     foo(());
    |         ^^
 
 error: passing a unit value to a function
-  --> $DIR/unit_arg.rs:28:9
+  --> $DIR/unit_arg.rs:29:9
    |
-28 |       foo({
+LL |       foo({
    |  _________^
-29 | |         foo(1);
-30 | |         foo(2);
-31 | |     });
+LL | |         foo(1);
+LL | |         foo(2);
+LL | |     });
    | |_____^
+   |
 help: if you intended to pass a unit value, use a unit literal instead
    |
-28 |     foo(());
+LL |     foo(());
    |         ^^
 
 error: passing a unit value to a function
-  --> $DIR/unit_arg.rs:32:10
+  --> $DIR/unit_arg.rs:33:10
    |
-32 |     foo3({}, 2, 2);
+LL |     foo3({}, 2, 2);
    |          ^^
+   |
 help: if you intended to pass a unit value, use a unit literal instead
    |
-32 |     foo3((), 2, 2);
+LL |     foo3((), 2, 2);
    |          ^^
 
 error: passing a unit value to a function
-  --> $DIR/unit_arg.rs:34:11
+  --> $DIR/unit_arg.rs:35:11
+   |
+LL |       b.bar({
+   |  ___________^
+LL | |         1;
+LL | |     });
+   | |_____^
    |
-34 |     b.bar({ 1; });
-   |           ^^^^^^
 help: if you intended to pass a unit value, use a unit literal instead
    |
-34 |     b.bar(());
+LL |     b.bar(());
    |           ^^
 
 error: aborting due to 6 previous errors