fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
2.0 KiB70 linesraw
1error[E0061]: this function takes 1 parameter but 0 parameters were supplied
2  --> $DIR/missing-unit-argument.rs:11:33
3   |
4LL |     let _: Result<(), String> = Ok();
5   |                                 ^^^^
6help: expected the unit value `()`; create it with empty parentheses
7   |
8LL |     let _: Result<(), String> = Ok(());
9   |                                    ^^
10
11error[E0061]: this function takes 2 parameters but 0 parameters were supplied
12  --> $DIR/missing-unit-argument.rs:12:5
13   |
14LL | fn foo(():(), ():()) {}
15   | -------------------- defined here
16...
17LL |     foo();
18   |     ^^^^^ expected 2 parameters
19
20error[E0061]: this function takes 2 parameters but 1 parameter was supplied
21  --> $DIR/missing-unit-argument.rs:13:5
22   |
23LL | fn foo(():(), ():()) {}
24   | -------------------- defined here
25...
26LL |     foo(());
27   |     ^^^^^^^ expected 2 parameters
28
29error[E0061]: this function takes 1 parameter but 0 parameters were supplied
30  --> $DIR/missing-unit-argument.rs:14:5
31   |
32LL | fn bar(():()) {}
33   | ------------- defined here
34...
35LL |     bar();
36   |     ^^^^^
37help: expected the unit value `()`; create it with empty parentheses
38   |
39LL |     bar(());
40   |         ^^
41
42error[E0061]: this function takes 1 parameter but 0 parameters were supplied
43  --> $DIR/missing-unit-argument.rs:15:7
44   |
45LL |     fn baz(self, (): ()) { }
46   |     -------------------- defined here
47...
48LL |     S.baz();
49   |       ^^^
50help: expected the unit value `()`; create it with empty parentheses
51   |
52LL |     S.baz(());
53   |           ^^
54
55error[E0061]: this function takes 1 parameter but 0 parameters were supplied
56  --> $DIR/missing-unit-argument.rs:16:7
57   |
58LL |     fn generic<T>(self, _: T) { }
59   |     ------------------------- defined here
60...
61LL |     S.generic::<()>();
62   |       ^^^^^^^
63help: expected the unit value `()`; create it with empty parentheses
64   |
65LL |     S.generic::<()>(());
66   |                     ^^
67
68error: aborting due to 6 previous errors
69
70For more information about this error, try `rustc --explain E0061`.