bevy/crates/bevy_ecs/src
ira b0bd8722f3 Fix unsound EntityMut::remove_children. Add EntityMut::world_scope (#6464)
`EntityMut::remove_children` does not call `self.update_location()` which is unsound.
Verified by adding the following assertion, which fails when running the tests.
```rust
let before = self.location();
self.update_location();
assert_eq!(before, self.location());
```

I also removed incorrect messages like "parent entity is not modified" and the unhelpful "Inserting a bundle in the children entities may change the parent entity's location if they were of the same archetype" which might lead people to think that's the *only* thing that can change the entity's location.

# Changelog
Added `EntityMut::world_scope`.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
2022-11-04 17:30:40 +00:00
..
entity [Fixes #6059] `Entity`'s “ID” should be named “index” instead (#6107) 2022-11-02 15:19:50 +00:00
query Remove unnecesary branches/panics from Query accesses (#6461) 2022-11-04 06:04:55 +00:00
schedule fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
storage Remove unnecesary branches/panics from Query accesses (#6461) 2022-11-04 06:04:55 +00:00
system Replace WorldQueryGats trait with actual gats (#6319) 2022-11-03 16:33:05 +00:00
world Fix unsound EntityMut::remove_children. Add EntityMut::world_scope (#6464) 2022-11-04 17:30:40 +00:00
archetype.rs Fix spawning empty bundles (#6425) 2022-11-03 22:50:41 +00:00
bundle.rs Fix spawning empty bundles (#6425) 2022-11-03 22:50:41 +00:00
change_detection.rs Implement IntoIterator for ECS wrapper types. (#5096) 2022-10-24 21:01:08 +00:00
component.rs Fix CI issues arising from use of Rust 1.64 (#6067) 2022-09-22 16:56:43 +00:00
event.rs Optimize use statement (#5992) 2022-09-15 17:05:09 +00:00
lib.rs Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
reflect.rs Enable Constructing ReflectComponent/Resource (#6257) 2022-10-17 14:01:50 +00:00