sigp / superstruct

Rust library for versioned data types
https://sigp.github.io/superstruct/
Apache License 2.0
65 stars 3 forks source link

Reject multiple top-level attributes #39

Open michaelsproul opened 8 months ago

michaelsproul commented 8 months ago

This compiles while ignoring the second attribute:

#[superstruct(variants(A, B))]
#[superstruct(variants(C, D))]
struct MyThing;

We should reject it, but it's not clear how to do this. See https://github.com/sigp/superstruct/pull/38 and the TODO added there.