bevy/crates/bevy_reflect/derive/src
Nicholas Nethercote b8072864aa
Streamline GetOwnership/FromArg/IntoReturn (#20126)
# Objective

Three impls are generated for each of these traits when the
`reflect_functions` feature is enabled.

Helps with #19873.

## Solution

Two of the three (the `&T` and `&mut T` ones) can be avoided by instead
providing blanket impls. The impl for `T` remains.

## Testing

I checked the output via `cargo expand`.

According to `-Zmacro-stats`, the size of the `Reflect` code generate
for `bevy_ui` drops by 10.4%.
2025-07-14 21:57:34 +00:00
..
impls Streamline GetOwnership/FromArg/IntoReturn (#20126) 2025-07-14 21:57:34 +00:00
attribute_parser.rs
container_attributes.rs Address Lints in bevy_reflect (#18479) 2025-03-23 23:53:31 +00:00
custom_attributes.rs bevy_reflect: avoid useless with_{custom_attributes,docs} calls (#19875) 2025-06-30 23:29:24 +00:00
derive_data.rs bevy_reflect: Use active_types instead of active_fields where appropriate (#19922) 2025-07-14 20:24:46 +00:00
documentation.rs bevy_reflect: avoid useless with_{custom_attributes,docs} calls (#19875) 2025-06-30 23:29:24 +00:00
enum_utility.rs bevy_reflect: Introduce reflect_clone_and_take. (#19944) 2025-07-07 19:57:29 +00:00
field_attributes.rs bevy_reflect: Reflection-based cloning (#13432) 2025-03-11 06:02:59 +00:00
from_reflect.rs bevy_reflect: streamline generated FromReflect::from_reflect (#19906) 2025-07-02 14:59:20 +00:00
generics.rs
ident.rs
lib.rs bevy_reflect: Avoid trait bounds on non-generic types (#19929) 2025-07-07 19:53:14 +00:00
meta.rs
reflect_opaque.rs
registration.rs bevy_reflect: Remove unnecessary allow(unused_mut). (#19930) 2025-07-03 22:27:58 +00:00
remote.rs
result_sifter.rs
serialization.rs
string_expr.rs bevy_reflect: Fix TypePath string concatenation (#18609) 2025-03-29 21:01:53 +00:00
struct_utility.rs bevy_reflect: Reflection-based cloning (#13432) 2025-03-11 06:02:59 +00:00
trait_reflection.rs Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
type_path.rs
where_clause_options.rs bevy_reflect: Use active_types instead of active_fields where appropriate (#19922) 2025-07-14 20:24:46 +00:00