summary refs log tree commit diff
path: root/src/test/ui/span/missing-unit-argument.stderr
blob: e508a30d1826ca801ce4591798aa4f2e01c6c76c (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
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
  --> $DIR/missing-unit-argument.rs:15:33
   |
15 |     let _: Result<(), String> = Ok();
   |                                 ^^^^
   |
help: expected the unit value `()`. You can create one with a pair of parenthesis
   |
15 |     let _: Result<(), String> = Ok(());
   |                                    ^^

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

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

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
  --> $DIR/missing-unit-argument.rs:18:5
   |
12 | fn bar(():()) {}
   | ---------------- defined here
...
18 |     bar();
   |     ^^^^^
   |
help: expected the unit value `()`. You can create one with a pair of parenthesis
   |
18 |     bar(());
   |         ^^

error: aborting due to 4 previous errors