Skip to content

impl Clone for bevy_light Shader markers#23671

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
ChristopherBiscardi:shadow-receiver
Apr 7, 2026
Merged

impl Clone for bevy_light Shader markers#23671
alice-i-cecile merged 1 commit intobevyengine:mainfrom
ChristopherBiscardi:shadow-receiver

Conversation

@ChristopherBiscardi
Copy link
Copy Markdown
Contributor

Objective

Enable the use of NotShadowReceiver in bsn! by implementing Clone (Default is already implemented).

error[E0277]: the trait bound `NotShadowReceiver: Clone` is not satisfied
   --> src/spawn_circle.rs:375:27
    |
375 |           world.spawn_scene(bsn! {
    |  ___________________________^
376 | |             #SpawnCircle
377 | |             SpawnCircle
378 | |             SpawnEventToTrigger({self.event})
...   |
394 | |             )]
395 | |         });
    | |_________^ the trait `Clone` is not implemented for `NotShadowReceiver`
    |

I also noticed TransmittedShadowReceiver would have the same issue, so added Clone there as well.


An alternative would be to implement FromTemplate instead of Default and Clone. I'm not sure which solution is preferred in general, but these are Marker components so don't require any additional values.

@ChristopherBiscardi ChristopherBiscardi added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 5, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in ECS Apr 5, 2026
@JMS55 JMS55 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 6, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 6, 2026
Merged via the queue into bevyengine:main with commit a026ab9 Apr 7, 2026
47 checks passed
@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in ECS Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants