# 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 ``` |
||
|---|---|---|
| .. | ||
| impls | ||
| attribute_parser.rs | ||
| container_attributes.rs | ||
| custom_attributes.rs | ||
| derive_data.rs | ||
| documentation.rs | ||
| enum_utility.rs | ||
| field_attributes.rs | ||
| from_reflect.rs | ||
| generics.rs | ||
| ident.rs | ||
| lib.rs | ||
| meta.rs | ||
| reflect_opaque.rs | ||
| registration.rs | ||
| remote.rs | ||
| result_sifter.rs | ||
| serialization.rs | ||
| string_expr.rs | ||
| struct_utility.rs | ||
| trait_reflection.rs | ||
| type_path.rs | ||
| where_clause_options.rs | ||