![]() # Objective - Currently, the error span for `get_struct_field` when encountering an enum or union points to the macro invocation, rather than the `enum` or `union` token. It also doesn't mention which macro reported the error. ## Solution - Report the correct error span - Add parameter for passing in the name of the macro invocation ## Testing Bevy compiles fine with this change ## Migration Guide ```rs // before let fields = get_struct_fields(&ast.data); // after let fields = get_struct_fields(&ast.data, "derive(Bundle)"); ``` --------- Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |