1
+ [clippy_lints/src/default_constructed_unit_structs.rs:78:51] s = "Self::default()"
1
2
error: use of `default` to create a unit struct
2
3
--> tests/ui/default_constructed_unit_structs.rs:11:9
3
4
|
4
- LL | Self::default()
5
- | _________ ^^^^-^^^^^^^^^^
6
- LL | |
7
- | |________- help: remove this call to `default`
5
+ LL | Self::default()
6
+ | ^^^^-----------
7
+ | |
8
+ | help: remove this call to `default`
8
9
|
9
10
= note: `-D clippy::default-constructed-unit-structs` implied by `-D warnings`
10
11
= help: to override `-D warnings` add `#[allow(clippy::default_constructed_unit_structs)]`
11
12
13
+ [clippy_lints/src/default_constructed_unit_structs.rs:78:51] s = "PhantomData::default()"
12
14
error: use of `default` to create a unit struct
13
15
--> tests/ui/default_constructed_unit_structs.rs:54:20
14
16
|
@@ -17,6 +19,7 @@ LL | inner: PhantomData::default(),
17
19
| |
18
20
| help: remove this call to `default`
19
21
22
+ [clippy_lints/src/default_constructed_unit_structs.rs:78:51] s = "PhantomData::<usize>::default()"
20
23
error: use of `default` to create a unit struct
21
24
--> tests/ui/default_constructed_unit_structs.rs:128:13
22
25
|
@@ -25,6 +28,7 @@ LL | let _ = PhantomData::<usize>::default();
25
28
| |
26
29
| help: remove this call to `default`
27
30
31
+ [clippy_lints/src/default_constructed_unit_structs.rs:78:51] s = "PhantomData::default()"
28
32
error: use of `default` to create a unit struct
29
33
--> tests/ui/default_constructed_unit_structs.rs:130:31
30
34
|
@@ -33,6 +37,7 @@ LL | let _: PhantomData<i32> = PhantomData::default();
33
37
| |
34
38
| help: remove this call to `default`
35
39
40
+ [clippy_lints/src/default_constructed_unit_structs.rs:78:51] s = "std::marker::PhantomData::default()"
36
41
error: use of `default` to create a unit struct
37
42
--> tests/ui/default_constructed_unit_structs.rs:132:31
38
43
|
@@ -41,6 +46,7 @@ LL | let _: PhantomData<i32> = std::marker::PhantomData::default();
41
46
| |
42
47
| help: remove this call to `default`
43
48
49
+ [clippy_lints/src/default_constructed_unit_structs.rs:78:51] s = "UnitStruct::default()"
44
50
error: use of `default` to create a unit struct
45
51
--> tests/ui/default_constructed_unit_structs.rs:134:13
46
52
|
@@ -49,5 +55,18 @@ LL | let _ = UnitStruct::default();
49
55
| |
50
56
| help: remove this call to `default`
51
57
52
- error: aborting due to 6 previous errors
58
+ [clippy_lints/src/default_constructed_unit_structs.rs:78:51] s = "<G>::default()"
59
+ error: use of `default` to create a unit struct
60
+ --> tests/ui/default_constructed_unit_structs.rs:172:7
61
+ |
62
+ LL | f(<G>::default());
63
+ | ^^^^^^^^^^^^^^
64
+ |
65
+ help: remove this call to `default`
66
+ |
67
+ LL - f(<G>::default());
68
+ LL + f(G);
69
+ |
70
+
71
+ error: aborting due to 7 previous errors
53
72
0 commit comments