error: custom attribute panicked
--> ubiart_toolkit/src/cooked/isg/mod.rs:18:1
|
18 | #[superstruct(variants(V22, V21, V20, V20C, V19, V18, V17, V16))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: called `Result::unwrap()` on an `Err` value: Error { kind: UnknownField(ErrorUnknownField { name: "V19", did_you_mean: None }), locations: [], span: Some(#0 bytes(619472..619475)) }
I got this error message:
which was because I had a field attribute
[superstruct(V19)]instead of[superstruct(only(V19))]. It would be nice of the error message detected that the field name is also an attribute and suggestsonlyand any other relevant attributes.If it could also give the line number that would be even better.