mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
41 lines
1.7 KiB
Text
41 lines
1.7 KiB
Text
error: use of `default` to create a unit struct
|
|
--> tests/ui/default_constructed_unit_structs.rs:11:13
|
|
|
|
|
LL | Self::default()
|
|
| ^^^^^^^^^^^ help: remove this call to `default`
|
|
|
|
|
= note: `-D clippy::default-constructed-unit-structs` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::default_constructed_unit_structs)]`
|
|
|
|
error: use of `default` to create a unit struct
|
|
--> tests/ui/default_constructed_unit_structs.rs:53:31
|
|
|
|
|
LL | inner: PhantomData::default(),
|
|
| ^^^^^^^^^^^ help: remove this call to `default`
|
|
|
|
error: use of `default` to create a unit struct
|
|
--> tests/ui/default_constructed_unit_structs.rs:126:33
|
|
|
|
|
LL | let _ = PhantomData::<usize>::default();
|
|
| ^^^^^^^^^^^ help: remove this call to `default`
|
|
|
|
error: use of `default` to create a unit struct
|
|
--> tests/ui/default_constructed_unit_structs.rs:127:42
|
|
|
|
|
LL | let _: PhantomData<i32> = PhantomData::default();
|
|
| ^^^^^^^^^^^ help: remove this call to `default`
|
|
|
|
error: use of `default` to create a unit struct
|
|
--> tests/ui/default_constructed_unit_structs.rs:128:55
|
|
|
|
|
LL | let _: PhantomData<i32> = std::marker::PhantomData::default();
|
|
| ^^^^^^^^^^^ help: remove this call to `default`
|
|
|
|
error: use of `default` to create a unit struct
|
|
--> tests/ui/default_constructed_unit_structs.rs:129:23
|
|
|
|
|
LL | let _ = UnitStruct::default();
|
|
| ^^^^^^^^^^^ help: remove this call to `default`
|
|
|
|
error: aborting due to 6 previous errors
|
|
|