We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d09a8cf commit 35dcd82Copy full SHA for 35dcd82
test_suite/common.rs
@@ -19,6 +19,16 @@ enum Test1 {
19
E = 1 << 34,
20
}
21
22
+#[enumflags2::bitflags(default = B | C)]
23
+#[derive(Copy, Clone, Debug)]
24
+#[repr(u8)]
25
+enum Default6 {
26
+ A = 1 << 0,
27
+ B = 1 << 1,
28
+ C = 1 << 2,
29
+ D = 1 << 3,
30
+}
31
+
32
#[test]
33
fn test_foo() {
34
use enumflags2::BitFlags;
@@ -60,6 +70,8 @@ fn test_foo() {
60
70
assert_eq!(b, Test::A | Test::C);
61
71
62
72
assert_eq!((Test::A ^ Test::B), Test::A | Test::B);
73
74
+ assert_eq!(BitFlags::<Default6>::default(), Default6::B | Default6::C);
63
75
64
76
65
77
0 commit comments