blob: 33ff972101f74e178afacf0a3f7a1445904dbe46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
use enumset::*;
#[derive(EnumSetType)]
#[repr(usize)]
enum BadRepr {
Variant,
}
#[derive(EnumSetType)]
#[repr(usize)]
enum GenericEnum<T> {
Variant,
FieldBlah(T),
}
#[derive(EnumSetType)]
struct BadItemType {
}
#[derive(EnumSetType)]
#[enumset(repr = "u8", repr = "u16")]
enum MultipleReprs {
Variant,
}
#[derive(EnumSetType)]
#[enumset(repr = "abcdef")]
enum InvalidRepr {
Variant,
}
#[derive(EnumSetType)]
#[enumset(serialize_repr = "abcdef")]
enum InvalidSerdeRepr {
Variant,
}
fn main() {}
|