# Objective All the derived reflection methods currently have multiple trait bounds on non-generic field types, which serve no purpose. The are emitted because "emit bounds on all fields" is easier than "emit bounds on fields that need them". But improving things isn't too hard. Similarly, lots of useless `Any + Send + Sync` bounds exist on non-generic types. Helps a lot with #19873. ## Solution Remove the unnecessary bounds by only emitting them if the relevant type is generic. ## Testing I used `cargo expand` to confirm the unnecessary bounds are no longer produced. `-Zmacro-stats` output tells me this reduces the size of the `Reflect` code produced for `bevy_ui` by 21.2%. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||