fix(derive): Disallow attributes on top-level ValuEnum

This commit is contained in:
Ed Page 2022-09-06 10:40:12 -05:00
parent 1d973bd1c1
commit 9eb72ea5b6

View file

@ -99,6 +99,14 @@ impl Item {
// Ignoring `push_doc_comment` as there is no top-level clap builder to add documentation
// to
if res.has_explicit_methods() {
abort!(
res.methods[0].name.span(),
"{} doesn't exist for `ValueEnum` enums",
res.methods[0].name
);
}
res
}