mirror of
https://github.com/bevyengine/bevy
synced 2024-12-23 03:23:20 +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`. |
||
---|---|---|
.. | ||
commands | ||
exclusive_system.rs | ||
function_system.rs | ||
mod.rs | ||
query.rs | ||
system.rs | ||
system_chaining.rs | ||
system_param.rs |