`Component` derive macro does not work with `#![feature(default_field_values)]` structs
Open
C-Bug
C-Dependencies
S-Blocked
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
0.16
## What you did
I've turned on `#![feature(default_field_values)]` for the crate and wanted to specify default values for my component struct. Like:
```rust
#[derive(Component, Default)]
pub struct ConveyorBelt {
pub speed: f32 = 1.0, // I get "expected ','" message here
}
```
## What went wrong
It appears that `#[derive(Component)]` does not work for structs which have default values in their declared fields.
## Additional information
The main problem is that the diagnostics is very vague. I couldn't figure out that the issue is in Component derive implementation.
Contributor guide
Assessment
This issue has not been assessed yet.