bevy/crates/bevy_ecs/src
Christian Hughes b09bbfa905
Remove unsound Clone impl for EntityMutExcept (#17032)
# Objective

`EntityMutExcept` can currently be cloned, which can easily violate
aliasing rules.

## Solution

- Remove the `Clone` impl for `EntityMutExcept`
- Also manually derived `Clone` impl for `EntityRefExcept` so that `B:
Clone` isn't required, and also impl'd `Copy`

## Testing

Compile failure tests would be good for this, but I'm not exactly sure
how to set that up.

## Migration Guide

- `EntityMutExcept` can no-longer be cloned, as this violates Rust's
memory safety rules.
2024-12-30 05:17:46 +00:00
..
entity Fix random clippy warning (#17010) 2024-12-29 19:28:59 +00:00
event Add no_std support to bevy_ecs (#16758) 2024-12-17 21:40:36 +00:00
identifier Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
observer Move some structs that impl Command to methods on World and EntityWorldMut (#16999) 2024-12-29 22:18:53 +00:00
query Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
reflect Move some structs that impl Command to methods on World and EntityWorldMut (#16999) 2024-12-29 22:18:53 +00:00
schedule panic on system error (#16979) 2024-12-26 23:44:46 +00:00
storage Prevent creation of superfluous empty table (#16935) 2024-12-22 23:04:32 +00:00
system Move some structs that impl Command to methods on World and EntityWorldMut (#16999) 2024-12-29 22:18:53 +00:00
world Remove unsound Clone impl for EntityMutExcept (#17032) 2024-12-30 05:17:46 +00:00
archetype.rs Add no_std support to bevy_ecs (#16758) 2024-12-17 21:40:36 +00:00
batching.rs Fix *most* clippy lints (#15906) 2024-10-14 20:52:35 +00:00
bundle.rs Add no_std support to bevy_ecs (#16758) 2024-12-17 21:40:36 +00:00
change_detection.rs Set panic as default fallible system param behavior (#16638) 2024-12-24 02:36:03 +00:00
component.rs Faster entity cloning (#16717) 2024-12-18 20:03:39 +00:00
intern.rs Remove OnceLock usage from bevy_ecs (#16870) 2024-12-17 22:42:42 +00:00
label.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
lib.rs impl EntityBorrow for more types (#16917) 2024-12-24 02:47:03 +00:00
name.rs Add no_std support to bevy_input (#16995) 2024-12-29 22:46:30 +00:00
removal_detection.rs Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
result.rs Add no_std support to bevy_ecs (#16758) 2024-12-17 21:40:36 +00:00
traversal.rs Window picking (#16103) 2024-12-05 21:14:39 +00:00