error[E0277]: the trait bound `CustomType: serde::ser::Serialize` is not satisfied --> tests/ui/trait_is_missing.rs:10:12 | 10 | field: CustomType, | ^^^^^^^^^^ the trait `serde::ser::Serialize` is not implemented for `CustomType` | = help: the following other types implement trait `serde::ser::Serialize`: &'a T &'a mut T () (T0, T1) (T0, T1, T2) (T0, T1, T2, T3) (T0, T1, T2, T3, T4) (T0, T1, T2, T3, T4, T5) and $N others note: required by a bound in `DefaultTrait` --> src/wrapper/default_trait.rs | | pub struct DefaultTrait | ------------ required by a bound in this struct | where | T: Serialize + DeserializeOwned + Default, | ^^^^^^^^^ required by this bound in `DefaultTrait` error[E0277]: the trait bound `CustomType: Default` is not satisfied --> tests/ui/trait_is_missing.rs:10:12 | 10 | field: CustomType, | ^^^^^^^^^^ the trait `Default` is not implemented for `CustomType` | note: required by a bound in `DefaultTrait` --> src/wrapper/default_trait.rs | | pub struct DefaultTrait | ------------ required by a bound in this struct | where | T: Serialize + DeserializeOwned + Default, | ^^^^^^^ required by this bound in `DefaultTrait` help: consider annotating `CustomType` with `#[derive(Default)]` | 3 + #[derive(Default)] 4 | struct CustomType { | error[E0277]: the trait bound `for<'de> CustomType: serde::de::Deserialize<'de>` is not satisfied --> tests/ui/trait_is_missing.rs:10:12 | 10 | field: CustomType, | ^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `CustomType` | = help: the following other types implement trait `serde::de::Deserialize<'de>`: &'a Path &'a [u8] &'a str () (T0, T1) (T0, T1, T2) (T0, T1, T2, T3) (T0, T1, T2, T3, T4) and $N others = note: required for `CustomType` to implement `serde::de::DeserializeOwned` note: required by a bound in `DefaultTrait` --> src/wrapper/default_trait.rs | | pub struct DefaultTrait | ------------ required by a bound in this struct | where | T: Serialize + DeserializeOwned + Default, | ^^^^^^^^^^^^^^^^ required by this bound in `DefaultTrait`