bevy/crates
Tim Overbeek 173680944f
fix generics for relationships (#18136)
# Objective
Allow Relationship to be derived for structs with generics.

fixes #18133
## Solution

"X" inside #[relationship_target(relationship = X)] was previously
parsed as Idents,
now they are parsed as syn::Type

## Testing

```rust
#[derive(Component)]
#[relationship(relationship_target = Attachments<T>)]
pub struct AttachedTo<T: Send + Sync + 'static> {
    #[relationship]
    pub entity: Entity,
    pub marker: PhantomData<T>,
}

#[derive(Component)]
#[relationship_target(relationship = AttachedTo<T>)]
pub struct Attachments<T: Send + Sync + 'static> {
    #[relationship]
    entities: Vec<Entity>,
    pub marker: PhantomData<T>,
}
```
This now compiles!
2025-03-03 19:33:29 +00:00
..
bevy_a11y Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_animation Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_app Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_asset Make asset watcher work when path contains "../" (#18023) 2025-03-02 18:15:27 +00:00
bevy_audio Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_color Allow bevy_reflect and wgpu-types features in no_std for bevy_color (#18061) 2025-03-01 00:31:35 +00:00
bevy_core_pipeline Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_derive Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_dev_tools Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_diagnostic Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_dylib Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_ecs fix generics for relationships (#18136) 2025-03-03 19:33:29 +00:00
bevy_encase_derive Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_gilrs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_gizmos Incorporate OIT into MeshPipelineKey used by the LineGizmoPipeline (#17946) 2025-02-24 21:31:54 +00:00
bevy_gltf Refactor bevy_gltf (#15994) 2025-02-26 01:00:11 +00:00
bevy_image Bump typos to 1.30.0 (#18097) 2025-03-02 19:02:23 +00:00
bevy_input Fix incorrect doc about GamepadAxis::RightZ/LeftZ (#18114) 2025-03-02 19:18:01 +00:00
bevy_input_focus Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_internal Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_log Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_macro_utils Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_math Improve cubic segment bezier functionality (#17645) 2025-02-26 20:36:54 +00:00
bevy_mesh Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_mikktspace Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_pbr Reextract meshes when their material assets change. (#18123) 2025-03-03 06:28:33 +00:00
bevy_picking Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_platform_support Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +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 Improve bevy_reflect no_std support (#18060) 2025-02-27 06:16:10 +00:00
bevy_remote BRP resource methods (#17423) 2025-02-26 20:29:47 +00:00
bevy_render Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_scene Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_sprite Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_state Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_tasks TaskPool: Prefer task completion over executing new tasks (#18009) 2025-02-26 00:08:36 +00:00
bevy_text Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_time Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_transform Remove ChildOf::get and Deref impl (#18080) 2025-02-27 23:11:03 +00:00
bevy_ui Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
bevy_utils Automatically enable portable-atomic when required (#17570) 2025-02-24 20:52:46 +00:00
bevy_window Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
bevy_winit Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00