bevy/crates/bevy_ecs/src
PROMETHIA-27 f3b5bf029c Add FromWorld bound to T in Local<T> (#5481)
# Objective

Currently, actually using a `Local` on a system requires that it be `T: FromWorld`, but that requirement is only expressed on the `SystemParam` machinery, which leads to the confusing error message for when the user attempts to add an invalid system. By adding these bounds to `Local` directly, it improves clarity on usage and semantics. 

## Solution

- Add `T: FromWorld` bound to `Local`'s definition

## Migration Guide

- It might be possible for references to `Local`s without `T: FromWorld` to exist, but these should be exceedingly rare and probably dead code. In the event that one of these is encountered, the easiest solutions are to delete the code or wrap the inner `T` in an `Option` to allow it to be default constructed to `None`.
2022-08-01 16:50:11 +00:00
..
entity Update codebase to use IntoIterator where possible. (#5269) 2022-07-11 15:28:50 +00:00
query Replace many_for_each_mut with iter_many_mut. (#5402) 2022-07-30 01:38:13 +00:00
schedule improve documentation for macro-generated label types (#5367) 2022-07-20 19:39:42 +00:00
storage Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
system Add FromWorld bound to T in Local<T> (#5481) 2022-08-01 16:50:11 +00:00
world Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
archetype.rs Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
bundle.rs add more SAFETY comments and lint for missing ones in bevy_ecs (#4835) 2022-07-04 14:44:24 +00:00
change_detection.rs Conversion of ResMut and NonSendMut to Mut (#5438) 2022-07-25 16:11:29 +00:00
component.rs add more SAFETY comments and lint for missing ones in bevy_ecs (#4835) 2022-07-04 14:44:24 +00:00
event.rs Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
lib.rs add more SAFETY comments and lint for missing ones in bevy_ecs (#4835) 2022-07-04 14:44:24 +00:00
reflect.rs Add apply_or_insert functions to reflected component and resources (#5201) 2022-07-11 14:11:24 +00:00