bevy/crates/bevy_reflect/bevy_reflect_derive/src
Gino Valente daa8bf20df
Fix nested generics in Reflect derive (#10791)
# Objective

> Issue raised on
[Discord](https://discord.com/channels/691052431525675048/1002362493634629796/1179182488787103776)

Currently the following code fails due to a missing `TypePath` bound:

```rust
#[derive(Reflect)] struct Foo<T>(T);
#[derive(Reflect)] struct Bar<T>(Foo<T>);
#[derive(Reflect)] struct Baz<T>(Bar<Foo<T>>);
```

## Solution

Add `TypePath` to the per-field bounds instead of _just_ the generic
type parameter bounds.

### Related Work

It should be noted that #9046 would help make these kinds of issues
easier to work around and/or avoid entirely.

---

## Changelog

- Fixes missing `TypePath` requirement when deriving `Reflect` on nested
generics
2023-11-29 01:46:09 +00:00
..
impls Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
container_attributes.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
derive_data.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
documentation.rs Moved fq_std from bevy_reflect_derive to bevy_macro_utils (#9956) 2023-10-02 00:22:57 +00:00
enum_utility.rs Moved fq_std from bevy_reflect_derive to bevy_macro_utils (#9956) 2023-10-02 00:22:57 +00:00
field_attributes.rs bevy_reflect: Fix combined field attributes (#9322) 2023-08-07 23:04:00 +00:00
from_reflect.rs bevy_reflect: Fix ignored/skipped field order (#7575) 2023-10-22 12:43:31 +00:00
lib.rs bevy_reflect: Fix ignored/skipped field order (#7575) 2023-10-22 12:43:31 +00:00
reflect_value.rs
registration.rs bevy_reflect: Fix ignored/skipped field order (#7575) 2023-10-22 12:43:31 +00:00
serialization.rs bevy_reflect: Fix ignored/skipped field order (#7575) 2023-10-22 12:43:31 +00:00
trait_reflection.rs Moved fq_std from bevy_reflect_derive to bevy_macro_utils (#9956) 2023-10-02 00:22:57 +00:00
type_path.rs
type_uuid.rs Add clippy::manual_let_else at warn level to lints (#10684) 2023-11-28 04:15:27 +00:00
utility.rs Fix nested generics in Reflect derive (#10791) 2023-11-29 01:46:09 +00:00