superstruct
superstruct copied to clipboard
Should reject unused top-level attributes with `no_enum`
Presently superstruct
will accept code like:
#[superstruct(no_enum, variants(A, B))]
#[derive(Serialize, Deserialize)]
pub struct Thing {
...
}
The derive(Serialize, Deserialize)
doesn't make sense here because there's no top-level type. The attribute is silently ignored. We should instead raise a compile-time error or warning so this useless code can be deleted.