bevy/crates
Nicholas Nethercote f1df61e458
bevy_reflect: Avoid trait bounds on non-generic types (#19929)
# 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%.
2025-07-07 19:53:14 +00:00
..
bevy_a11y Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_animation consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_anti_aliasing fix percentage signs in SMAA (#19987) 2025-07-06 22:24:26 +00:00
bevy_app Run RenderStartup in/before extract instead of after it. (#19926) 2025-07-07 01:31:40 +00:00
bevy_asset fix panic looking for extension in multibyte unicode paths (#19933) 2025-07-03 22:27:07 +00:00
bevy_audio SpatialListener now requires a Transform (#19357) 2025-07-07 19:48:57 +00:00
bevy_camera consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_color Ugrade to wgpu version 25.0 (#19563) 2025-06-26 19:41:47 +00:00
bevy_core_pipeline consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_core_widgets Newtyped ScrollPosition (#19881) 2025-07-01 17:41:48 +00:00
bevy_derive Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_dev_tools Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_diagnostic updating: very very minorly (#19827) 2025-06-26 21:48:20 +00:00
bevy_dylib Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_ecs Remove Bundle::register_required_components (#19967) 2025-07-06 18:15:28 +00:00
bevy_encase_derive Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_feathers Feathers toggle switches. (#19928) 2025-07-03 01:09:31 +00:00
bevy_gilrs Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_gizmos Use RenderStartup in bevy_gizmos. (#19898) 2025-07-02 20:38:37 +00:00
bevy_gltf consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_image optimize ktx2 level data concatenation (#19845) 2025-06-29 21:59:56 +00:00
bevy_input bevy_input: build warnings without bevy_reflect (#19862) 2025-06-29 17:13:43 +00:00
bevy_input_focus Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_internal make optional crates for mesh, camera, and light (#19997) 2025-07-07 07:35:32 +00:00
bevy_light bevy_light (#19991) 2025-07-07 00:07:38 +00:00
bevy_log Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_macro_utils Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_math consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_mesh refactor(mesh): move Mesh3d and Mesh2d into bevy_mesh (#19943) 2025-07-04 16:24:21 +00:00
bevy_mikktspace Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_pbr make optional crates for mesh, camera, and light (#19997) 2025-07-07 07:35:32 +00:00
bevy_picking Extract members of PickingPlugin and PointerInputPlugin into new types (#19078) 2025-07-07 19:40:25 +00:00
bevy_platform bevy_platform: clippy without default features (#19860) 2025-06-29 17:12:57 +00:00
bevy_ptr Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
bevy_reflect bevy_reflect: Avoid trait bounds on non-generic types (#19929) 2025-07-07 19:53:14 +00:00
bevy_remote Add support for returning all Component and values to query method in the Bevy Remote Protocol (#19857) 2025-07-03 18:51:32 +00:00
bevy_render make optional crates for mesh, camera, and light (#19997) 2025-07-07 07:35:32 +00:00
bevy_scene Upgrade to Rust 1.88 (#19825) 2025-06-26 19:38:19 +00:00
bevy_solari Make render and compute pipeline descriptors defaultable. (#19903) 2025-07-02 18:47:27 +00:00
bevy_sprite Split bevy_camera out of bevy_render (#19949) 2025-07-04 23:31:16 +00:00
bevy_state doc improvement for StateTransition (#19597) 2025-07-07 19:51:46 +00:00
bevy_tasks Update derive_more requirement from 1 to 2 (#19671) 2025-06-24 11:13:04 +00:00
bevy_text consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_time Bump Version after Release (#19774) 2025-06-22 23:06:43 +00:00
bevy_transform Update derive_more requirement from 1 to 2 (#19671) 2025-06-24 11:13:04 +00:00
bevy_ui consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_ui_render consistently dont use smallvec default features (#19972) 2025-07-06 04:25:26 +00:00
bevy_utils Have System::run_unsafe return Result. (#19145) 2025-07-03 21:48:09 +00:00
bevy_window bevy_window: fix compilation without default features (#19870) 2025-06-30 20:51:52 +00:00
bevy_winit bevy_winit: fix compile and clippy on wasm (#19869) 2025-06-29 21:30:28 +00:00