Closed hellow554 closed 2 years ago
The example shows how to disable the context suffix for every enum variant. However, I'd like to disable it completly for the complete enum. In the case of the example I would like to write:
#[derive(Debug, Snafu)] #[snafu(context(suffix(false)))] enum Error { #[snafu(context(suffix(Ctx)))] HasAnotherSuffix, DoesNotHaveASuffix, DoesNotHaveASuffixEither, }
The current error is:
error: context attribute is only valid on enum variants or structs with named fields, not on an enum
context
Seems reasonable as an upgrade path.
Can you try out the linked PR and see if it does what you'd expect?
The example shows how to disable the context suffix for every enum variant. However, I'd like to disable it completly for the complete enum. In the case of the example I would like to write:
The current error is: