mirror of
https://github.com/bevyengine/bevy
synced 2024-12-20 18:13:10 +00:00
1e97c79ec1
# Objective It was accidentally found that rustc is unable to parse certain constructs in `where` clauses properly. `bevy_reflect::Reflect`'s habit of copying and pasting the field types in a type's definition to its `where` clauses made it very easy to accidentally run into this behaviour - particularly with the construct ```rust where for<'a> fn(&'a T) -> &'a T: Trait1 + Trait2 ``` which was incorrectly parsed as ```rust where for<'a> (fn(&'a T) -> &'a T: Trait1 + Trait2) ^ ^ incorrect syntax grouping ``` instead of ```rust where (for<'a> fn(&'a T) -> &'a T): Trait1 + Trait2 ^ ^ correct syntax grouping ``` Fixes #8759 ## Solution This commit fixes the issue by inserting explicit parentheses to disambiguate types from their bound lists. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |