mirror of
https://github.com/bevyengine/bevy
synced 2024-11-23 13:13:49 +00:00
f3b5bf029c
# 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`. |
||
---|---|---|
.. | ||
entity | ||
query | ||
schedule | ||
storage | ||
system | ||
world | ||
archetype.rs | ||
bundle.rs | ||
change_detection.rs | ||
component.rs | ||
event.rs | ||
lib.rs | ||
reflect.rs |