statig icon indicating copy to clipboard operation
statig copied to clipboard

Forbid duplicate meta items in `#[state_machine]` attribute

Open mdeloof opened this issue 9 months ago • 0 comments

At the moment the #[state_machine] attribute will accept the following:

#[state_machine(
    state(derive(Debug)),
    state(derive(Clone))
)] 
impl Foo { ... }

Only the last state meta item with the Clone derive will be used and the state meta item with the Debug derive will be ignored.

To keep the macro code simple I suggest we forbid the use of duplicate meta items.

mdeloof avatar May 04 '25 15:05 mdeloof