aboutsummaryrefslogtreecommitdiff
path: root/tests/unstable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unstable.rs')
-rw-r--r--tests/unstable.rs45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/unstable.rs b/tests/unstable.rs
new file mode 100644
index 0000000..78dbd08
--- /dev/null
+++ b/tests/unstable.rs
@@ -0,0 +1,45 @@
+#![allow(dead_code)]
+#![cfg(not(remain_stable_testing))]
+#![feature(proc_macro_hygiene, stmt_expr_attributes)]
+
+#[remain::sorted]
+pub enum TestEnum {
+ A,
+ B,
+ C,
+ D,
+}
+
+#[remain::sorted]
+pub struct TestStruct {
+ a: usize,
+ b: usize,
+ c: usize,
+ d: usize,
+}
+
+#[test]
+fn test_match() {
+ let value = TestEnum::A;
+
+ #[remain::sorted]
+ let _ = match value {
+ TestEnum::A => {}
+ TestEnum::B => {}
+ TestEnum::C => {}
+ _ => {}
+ };
+}
+
+#[test]
+fn test_let() {
+ let value = TestEnum::A;
+
+ #[remain::sorted]
+ match value {
+ TestEnum::A => {}
+ TestEnum::B => {}
+ TestEnum::C => {}
+ _ => {}
+ }
+}