bevy/crates/bevy_reflect_compile_fail_tests/tests
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
..
reflect_derive Fix nested generics in Reflect derive (#10791) 2023-11-29 01:46:09 +00:00
type_uuid_derive Improve TypeUuid's derive macro error messages (#9315) 2023-10-02 12:42:01 +00:00
reflect_derive.rs bevy_reflect: Add compile fail tests for bevy_reflect (#7041) 2023-01-02 21:07:33 +00:00
type_uuid_derive.rs Improve TypeUuid's derive macro error messages (#9315) 2023-10-02 12:42:01 +00:00