summary refs log tree commit diff
path: root/src/test/ui/span/missing-unit-argument.stderr
blob: 672b0718a02d345eafbc33bb807b4ea51141c6f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
  --> $DIR/missing-unit-argument.rs:21:33
   |
21 |     let _: Result<(), String> = Ok();
   |                                 ^^^^
help: expected the unit value `()`; create it with empty parentheses
   |
21 |     let _: Result<(), String> = Ok(());
   |                                    ^^

error[E0061]: this function takes 2 parameters but 0 parameters were supplied
  --> $DIR/missing-unit-argument.rs:22:5
   |
11 | fn foo(():(), ():()) {}
   | ----------------------- defined here
...
22 |     foo();
   |     ^^^^^ expected 2 parameters

error[E0061]: this function takes 2 parameters but 1 parameter was supplied
  --> $DIR/missing-unit-argument.rs:23:9
   |
11 | fn foo(():(), ():()) {}
   | ----------------------- defined here
...
23 |     foo(());
   |         ^^ expected 2 parameters

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
  --> $DIR/missing-unit-argument.rs:24:5
   |
12 | fn bar(():()) {}
   | ---------------- defined here
...
24 |     bar();
   |     ^^^^^
help: expected the unit value `()`; create it with empty parentheses
   |
24 |     bar(());
   |         ^^

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