]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/unused_unit.stderr
Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyup
[rust.git] / src / tools / clippy / tests / ui / unused_unit.stderr
index 81e6738e6bf67b8cdec71e21fc20b5027cfe19b4..c45634c2b6df71a5131c4c7f8689e5a0edbf7607 100644 (file)
@@ -1,8 +1,8 @@
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:18:29
+  --> $DIR/unused_unit.rs:18:28
    |
 LL |     pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
-   |                             ^^^^^ help: remove the `-> ()`
+   |                            ^^^^^^ help: remove the `-> ()`
    |
 note: the lint level is defined here
   --> $DIR/unused_unit.rs:12:9
@@ -11,28 +11,28 @@ LL | #![deny(clippy::unused_unit)]
    |         ^^^^^^^^^^^^^^^^^^^
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:19:19
+  --> $DIR/unused_unit.rs:19:18
    |
 LL |     where G: Fn() -> () {
-   |                   ^^^^^ help: remove the `-> ()`
+   |                  ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:18:59
+  --> $DIR/unused_unit.rs:18:58
    |
 LL |     pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> ()
-   |                                                           ^^^^^ help: remove the `-> ()`
+   |                                                          ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:20:27
+  --> $DIR/unused_unit.rs:20:26
    |
 LL |         let _y: &dyn Fn() -> () = &f;
-   |                           ^^^^^ help: remove the `-> ()`
+   |                          ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:27:19
+  --> $DIR/unused_unit.rs:27:18
    |
 LL |     fn into(self) -> () {
-   |                   ^^^^^ help: remove the `-> ()`
+   |                  ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit expression
   --> $DIR/unused_unit.rs:28:9
@@ -41,46 +41,46 @@ LL |         ()
    |         ^^ help: remove the final `()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:33:30
+  --> $DIR/unused_unit.rs:33:29
    |
 LL |     fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
-   |                              ^^^^^ help: remove the `-> ()`
+   |                             ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:35:20
+  --> $DIR/unused_unit.rs:35:19
    |
 LL |         G: FnMut() -> (),
-   |                    ^^^^^ help: remove the `-> ()`
+   |                   ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:36:17
+  --> $DIR/unused_unit.rs:36:16
    |
 LL |         H: Fn() -> ();
-   |                 ^^^^^ help: remove the `-> ()`
+   |                ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:40:30
+  --> $DIR/unused_unit.rs:40:29
    |
 LL |     fn redundant<F: FnOnce() -> (), G, H>(&self, _f: F, _g: G, _h: H)
-   |                              ^^^^^ help: remove the `-> ()`
+   |                             ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:42:20
+  --> $DIR/unused_unit.rs:42:19
    |
 LL |         G: FnMut() -> (),
-   |                    ^^^^^ help: remove the `-> ()`
+   |                   ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:43:17
+  --> $DIR/unused_unit.rs:43:16
    |
 LL |         H: Fn() -> () {}
-   |                 ^^^^^ help: remove the `-> ()`
+   |                ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit return type
-  --> $DIR/unused_unit.rs:46:18
+  --> $DIR/unused_unit.rs:46:17
    |
 LL | fn return_unit() -> () { () }
-   |                  ^^^^^ help: remove the `-> ()`
+   |                 ^^^^^^ help: remove the `-> ()`
 
 error: unneeded unit expression
   --> $DIR/unused_unit.rs:46:26
@@ -100,5 +100,23 @@ error: unneeded `()`
 LL |     return();
    |           ^^ help: remove the `()`
 
-error: aborting due to 16 previous errors
+error: unneeded unit return type
+  --> $DIR/unused_unit.rs:75:10
+   |
+LL | fn test()->(){}
+   |          ^^^^ help: remove the `-> ()`
+
+error: unneeded unit return type
+  --> $DIR/unused_unit.rs:78:11
+   |
+LL | fn test2() ->(){}
+   |           ^^^^^ help: remove the `-> ()`
+
+error: unneeded unit return type
+  --> $DIR/unused_unit.rs:81:11
+   |
+LL | fn test3()-> (){}
+   |           ^^^^^ help: remove the `-> ()`
+
+error: aborting due to 19 previous errors