diff --git a/clap_derive/src/item.rs b/clap_derive/src/item.rs index d7b930c2..e4695d8b 100644 --- a/clap_derive/src/item.rs +++ b/clap_derive/src/item.rs @@ -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 }