summaryrefslogtreecommitdiffstats
path: root/third_party/rust/enumset/tests/compile-fail-serde/deprecation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/enumset/tests/compile-fail-serde/deprecation.rs')
-rw-r--r--third_party/rust/enumset/tests/compile-fail-serde/deprecation.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/third_party/rust/enumset/tests/compile-fail-serde/deprecation.rs b/third_party/rust/enumset/tests/compile-fail-serde/deprecation.rs
new file mode 100644
index 0000000000..72c19e29db
--- /dev/null
+++ b/third_party/rust/enumset/tests/compile-fail-serde/deprecation.rs
@@ -0,0 +1,20 @@
+#![deny(deprecated)]
+
+use enumset::*;
+use serde_derive::*;
+
+#[derive(Serialize, Deserialize, EnumSetType, Debug)]
+#[enumset(serialize_as_map)]
+#[serde(crate="enumset::__internal::serde")]
+pub enum MapEnum {
+ A, B, C, D, E, F, G, H,
+}
+
+#[derive(Serialize, Deserialize, EnumSetType, Debug)]
+#[enumset(serialize_as_list)]
+#[serde(crate="enumset::__internal::serde")]
+pub enum ListEnum {
+ A, B, C, D, E, F, G, H,
+}
+
+fn main() {}