You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Propagate rustdoc to generated (super)state enums
Problem: `state_machine!()` users could not document their state and
superstate handler functions with doc comments that would appear on
the generated enum variants. This made the generated code harder to
understand, reduced IDE support, and meant users could not use lints
like `missing_docs`.
Solution: Propagate doc comments through the macro pipeline by
extracting them from the state/superstate handler functions during
analysis, and then attaching the extracted doc comments as attributes
to the generated enum variants. Additionally we added default doc
comments to the generated State and Superstate enums.
Testing: Added trybuild tests that use `#![deny(missing_docs)]` to
validate that the doc comments are propagated.
0 commit comments