Better user-facing compile-time errors using #[diagnostic]
#13204
Labels
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
S-Duplicate
This issue or PR already exists
What problem does this solve or what need does it fill?
Currently, due to the heavy use of
all_tuples
(Bundling up generic types in tuples) in traits likeBundle
,SystemParam
,IntoSystemConfig
, user-facing compile time errors can get very messy and uninformative.For example (the actual problem was caused when forgetting to implement
Component
for some type):But it's gonna be very hard for inexperienced users to understand what the problem is, and how to fix it.
What solution would you like?
Version
1.78
introduced#[diagnostic]
attributes. We can use#[diagnostic::on_unimplemented]
to make those errors more informative and readable.The text was updated successfully, but these errors were encountered: