When you have a lot of variants, it can be a lot of visual noise to have an attribute macro on each.
So instead of
#[subenum(Foo, Bar)]
enum {
#[subenum(Foo)]
variant_1,
#[subenum(Foo)]
variant_2,
#[subenum(Foo)]
variant_3,
#[subenum(Bar)]
variant_4,
}
(but with Foo going a lot higher than 3), it would be nice to do
#[subenum(Foo, Bar)]
enum {
#[subenum_variants_start(Foo)]
variant_1,
variant_2,
#[subenum_variants_end(Foo)]
variant_3,
#[subenum(Bar)]
variant_4,
}
When you have a lot of variants, it can be a lot of visual noise to have an attribute macro on each.
So instead of
(but with Foo going a lot higher than 3), it would be nice to do