]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/span/missing-unit-argument.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / test / ui / span / missing-unit-argument.stderr
index e508a30d1826ca801ce4591798aa4f2e01c6c76c..672b0718a02d345eafbc33bb807b4ea51141c6f9 100644 (file)
@@ -1,45 +1,69 @@
 error[E0061]: this function takes 1 parameter but 0 parameters were supplied
-  --> $DIR/missing-unit-argument.rs:15:33
+  --> $DIR/missing-unit-argument.rs:21:33
    |
-15 |     let _: Result<(), String> = Ok();
+21 |     let _: Result<(), String> = Ok();
    |                                 ^^^^
+help: expected the unit value `()`; create it with empty parentheses
    |
-help: expected the unit value `()`. You can create one with a pair of parenthesis
-   |
-15 |     let _: Result<(), String> = Ok(());
+21 |     let _: Result<(), String> = Ok(());
    |                                    ^^
 
 error[E0061]: this function takes 2 parameters but 0 parameters were supplied
-  --> $DIR/missing-unit-argument.rs:16:5
+  --> $DIR/missing-unit-argument.rs:22:5
    |
 11 | fn foo(():(), ():()) {}
    | ----------------------- defined here
 ...
-16 |     foo();
+22 |     foo();
    |     ^^^^^ expected 2 parameters
 
 error[E0061]: this function takes 2 parameters but 1 parameter was supplied
-  --> $DIR/missing-unit-argument.rs:17:9
+  --> $DIR/missing-unit-argument.rs:23:9
    |
 11 | fn foo(():(), ():()) {}
    | ----------------------- defined here
 ...
-17 |     foo(());
+23 |     foo(());
    |         ^^ expected 2 parameters
 
 error[E0061]: this function takes 1 parameter but 0 parameters were supplied
-  --> $DIR/missing-unit-argument.rs:18:5
+  --> $DIR/missing-unit-argument.rs:24:5
    |
 12 | fn bar(():()) {}
    | ---------------- defined here
 ...
-18 |     bar();
+24 |     bar();
    |     ^^^^^
+help: expected the unit value `()`; create it with empty parentheses
    |
-help: expected the unit value `()`. You can create one with a pair of parenthesis
-   |
-18 |     bar(());
+24 |     bar(());
    |         ^^
 
-error: aborting due to 4 previous errors
+error[E0061]: this function takes 1 parameter but 0 parameters were supplied
+  --> $DIR/missing-unit-argument.rs:25:7
+   |
+16 |     fn baz(self, (): ()) { }
+   |     ------------------------ defined here
+...
+25 |     S.baz();
+   |       ^^^
+help: expected the unit value `()`; create it with empty parentheses
+   |
+25 |     S.baz(());
+   |           ^^
+
+error[E0061]: this function takes 1 parameter but 0 parameters were supplied
+  --> $DIR/missing-unit-argument.rs:26:7
+   |
+17 |     fn generic<T>(self, _: T) { }
+   |     ----------------------------- defined here
+...
+26 |     S.generic::<()>();
+   |       ^^^^^^^
+help: expected the unit value `()`; create it with empty parentheses
+   |
+26 |     S.generic::<()>(());
+   |                     ^^
+
+error: aborting due to 6 previous errors