bevy/crates/bevy_derive/src
Ted Driggs 8e1f660e1d Don't panic in macro shape validation (#3647)
# Objective
Emitting compile errors produces cleaner messages than panicking in a proc-macro.

## Solution
- Replace match-with-panic code with call to new `bevy_macro_utils::get_named_struct_fields` function
- Replace one use of match-with-panic for enums with inline match

_Aside:_ I'm also the maintainer of [`darling`](https://docs.rs/darling), a crate which provides a serde-like API for parsing macro inputs. I avoided using it here because it seemed like overkill, but if there are plans to add lots more attributes/macros then that might be a good way of offloading macro error handling.
2022-01-15 22:14:43 +00:00
..
app_plugin.rs Update derive(DynamicPlugin) to edition 2021 (#3038) 2021-10-27 19:48:12 +00:00
bevy_main.rs Fix errors and panics to typical Rust conventions (#968) 2020-12-02 11:31:16 -08:00
enum_variant_meta.rs Don't panic in macro shape validation (#3647) 2022-01-15 22:14:43 +00:00
lib.rs Remove Bytes, FromBytes, Labels, EntityLabels. Document rest of bevy_core and enable warning on missing docs. (#3521) 2022-01-02 20:36:40 +00:00
modules.rs Remove Bytes, FromBytes, Labels, EntityLabels. Document rest of bevy_core and enable warning on missing docs. (#3521) 2022-01-02 20:36:40 +00:00