mirror of https://github.com/zkat/miette.git
feat(derive): make #[diagnostic] optional for enums, too
This commit is contained in:
parent
824cd8bebe
commit
ffe1b558d0
|
|
@ -150,12 +150,6 @@ impl Diagnostic {
|
|||
fields: var.fields,
|
||||
args,
|
||||
});
|
||||
} else {
|
||||
// Also handle when there's multiple `#[diagnostic]` attrs?
|
||||
return Err(syn::Error::new(
|
||||
var.ident.span(),
|
||||
"#[diagnostic] attribute is required on all enum variants when deriving Diagnostic.",
|
||||
));
|
||||
}
|
||||
}
|
||||
Diagnostic::Enum {
|
||||
|
|
|
|||
Loading…
Reference in New Issue