summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/unit_arg.stderr
blob: 21ccc684ea9de9e30944abba009a9ce6958f4e5a (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
70
71
72
73
74
75
76
77
78
79
error: passing a unit value to a function
  --> $DIR/unit_arg.rs:24:9
   |
LL |     foo({});
   |         ^^
   |
   = note: `-D clippy::unit-arg` implied by `-D warnings`
help: if you intended to pass a unit value, use a unit literal instead
   |
LL |     foo(());
   |         ^^

error: passing a unit value to a function
  --> $DIR/unit_arg.rs:25:9
   |
LL |       foo({
   |  _________^
LL | |         1;
LL | |     });
   | |_____^
   |
help: if you intended to pass a unit value, use a unit literal instead
   |
LL |     foo(());
   |         ^^

error: passing a unit value to a function
  --> $DIR/unit_arg.rs:28:9
   |
LL |     foo(foo(1));
   |         ^^^^^^
   |
help: if you intended to pass a unit value, use a unit literal instead
   |
LL |     foo(());
   |         ^^

error: passing a unit value to a function
  --> $DIR/unit_arg.rs:29:9
   |
LL |       foo({
   |  _________^
LL | |         foo(1);
LL | |         foo(2);
LL | |     });
   | |_____^
   |
help: if you intended to pass a unit value, use a unit literal instead
   |
LL |     foo(());
   |         ^^

error: passing a unit value to a function
  --> $DIR/unit_arg.rs:33:10
   |
LL |     foo3({}, 2, 2);
   |          ^^
   |
help: if you intended to pass a unit value, use a unit literal instead
   |
LL |     foo3((), 2, 2);
   |          ^^

error: passing a unit value to a function
  --> $DIR/unit_arg.rs:35:11
   |
LL |       b.bar({
   |  ___________^
LL | |         1;
LL | |     });
   | |_____^
   |
help: if you intended to pass a unit value, use a unit literal instead
   |
LL |     b.bar(());
   |           ^^

error: aborting due to 6 previous errors