Closed BenjaminBrienen closed 2 months ago
Apparently my example is poor because:
error[E0277]: the trait bound `StructField<'_>: std::default::Default` is not satisfied
--> crates\bevy_reflect\derive\src\derive_data.rs:428:17
|
428 | ResultSifter::default(),
| ^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `StructField<'_>`, which is required by `ResultSifter<_>: std::default::Default`
|
= help: the trait `std::default::Default` is implemented for `ResultSifter<T>`
note: required for `ResultSifter<StructField<'_>>` to implement `std::default::Default`
--> crates\bevy_reflect\derive\src\result_sifter.rs:4:10
|
4 | #[derive(Default)]
| ^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
but I think the idea is still valid
If I find an actual good example of this I'll reopen it and give the better example
Every field of
Self
is initialized to its default value:suggestion: