bevy/crates
Gino Valente f4716034fa
bevy_reflect: Fix TypePath string concatenation (#18609)
# Objective

Fixes #18606

When a type implements `Add` for `String`, the compiler can get confused
when attempting to add a `&String` to a `String`.

Unfortunately, this seems to be [expected
behavior](https://github.com/rust-lang/rust/issues/77143#issuecomment-698369286)
which causes problems for generic types since the current `TypePath`
derive generates code that appends strings in this manner.

## Solution

Explicitly use the `Add<&str>` implementation in the `TypePath` derive
macro.

## Testing

You can test locally by running:

```
cargo check -p bevy_reflect --tests
```
2025-03-29 21:01:53 +00:00
..
bevy_a11y Update accesskit and accesskit_winit requirements (#18285) 2025-03-25 04:04:28 +00:00
bevy_animation Fix animation transitions affecting other entities (#18572) 2025-03-27 21:33:25 +00:00
bevy_anti_aliasing Remove Image::from_buffer name argument (only present in debug "dds" builds) (#18538) 2025-03-25 19:25:01 +00:00
bevy_app Fix misleading documentation of Main schedule (#18579) 2025-03-28 01:12:19 +00:00
bevy_asset Revert PR #15481 to resolve a regression. (#18567) 2025-03-27 21:32:01 +00:00
bevy_audio bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
bevy_color bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
bevy_core_pipeline Improved Require Syntax (#18555) 2025-03-26 17:48:27 +00:00
bevy_derive Link iOS example with rustc, and avoid C trampoline (#14780) 2025-03-17 21:14:07 +00:00
bevy_dev_tools Generic system config (#17962) 2025-03-12 00:12:30 +00:00
bevy_diagnostic Fix LogDiagnosticsPlugin log target typo (#18534) 2025-03-29 17:07:21 +00:00
bevy_dylib Switch from OnceCell to LazyLock in bevy_tasks (#18506) 2025-03-24 07:43:22 +00:00
bevy_ecs Fix relationship macro for multiple named members fields (#18530) 2025-03-27 21:35:47 +00:00
bevy_encase_derive Internalize BevyManifest logic. Switch to RwLock (#18263) 2025-03-12 00:46:01 +00:00
bevy_gilrs Replace some !Send resources with thread_local! (#17730) 2025-03-04 07:48:02 +00:00
bevy_gizmos Fix various unused import warnings with no features enabled (#18580) 2025-03-28 00:21:16 +00:00
bevy_gltf Revert PR #15481 to resolve a regression. (#18567) 2025-03-27 21:32:01 +00:00
bevy_image Remove Image::from_buffer name argument (only present in debug "dds" builds) (#18538) 2025-03-25 19:25:01 +00:00
bevy_input bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
bevy_input_focus bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
bevy_internal Remove Image::from_buffer name argument (only present in debug "dds" builds) (#18538) 2025-03-25 19:25:01 +00:00
bevy_log Add print_stdout and print_stderr lints (#17446) (#18233) 2025-03-11 19:35:48 +00:00
bevy_macro_utils Switch to ImDocument in BevyManifest (#18272) 2025-03-12 20:15:39 +00:00
bevy_math Add no_std compatible ceil method (#18498) 2025-03-25 04:18:00 +00:00
bevy_mesh Reduce dependencies on bevy_render by preferring bevy_mesh imports (#18437) 2025-03-25 04:14:42 +00:00
bevy_mikktspace Add print_stdout and print_stderr lints (#17446) (#18233) 2025-03-11 19:35:48 +00:00
bevy_pbr Tracy GPU support (#18490) 2025-03-28 04:57:01 +00:00
bevy_picking Make RayMap map public (#18544) 2025-03-25 19:15:20 +00:00
bevy_platform_support Address lints in bevy_platform_support (#18477) 2025-03-22 11:21:18 +00:00
bevy_ptr moved Debug from derive to impl_ptr in bevy_ptr (#18042) 2025-02-28 02:54:46 +00:00
bevy_reflect bevy_reflect: Fix TypePath string concatenation (#18609) 2025-03-29 21:01:53 +00:00
bevy_remote fix error and lints when building for wasm32 (#18500) 2025-03-23 22:06:28 +00:00
bevy_render Fix wesl in wasm and webgl2 (#18591) 2025-03-28 21:45:02 +00:00
bevy_scene Update bincode to 2.0 (#18396) 2025-03-25 04:09:46 +00:00
bevy_sprite don't flip sprites twice (#18535) 2025-03-25 18:20:13 +00:00
bevy_state Fix misleading documentation of Main schedule (#18579) 2025-03-28 01:12:19 +00:00
bevy_tasks Switch from OnceCell to LazyLock in bevy_tasks (#18506) 2025-03-24 07:43:22 +00:00
bevy_text ExtractedSprites slice buffer (#17041) 2025-03-25 03:51:50 +00:00
bevy_time Fix clippy::unnecessary-literal-unwrap in bevy_time (#18485) 2025-03-22 13:27:37 +00:00
bevy_transform Revert "Transform Propagation Optimization: Static Subtree Marking (#18094)" (#18363) 2025-03-17 20:01:29 +00:00
bevy_ui Improved Require Syntax (#18555) 2025-03-26 17:48:27 +00:00
bevy_utils Address clippy::let_and_return in bevy_utils (#18480) 2025-03-22 11:44:49 +00:00
bevy_window Use current_exe for default window title (#18553) 2025-03-26 17:32:18 +00:00
bevy_winit Fix UpdateMode::Reactive behavior on Windows (#18493) 2025-03-25 20:29:50 +00:00