diff options
author | David Tolnay <dtolnay@gmail.com> | 2019-03-11 11:23:21 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2019-03-11 11:23:21 -0700 |
commit | 917a06a4c28d8e96ff8129c4f1d1e619ed925613 (patch) | |
tree | 35bddd852656e62e124311b9a304af8234b5a219 /tests/unstable.rs | |
parent | 395392dafcfe6e9ebd54cdbeca2840f9165639fb (diff) | |
download | remain-917a06a4c28d8e96ff8129c4f1d1e619ed925613.tar.gz |
Add tests with and without proc macro hygiene
Diffstat (limited to 'tests/unstable.rs')
-rw-r--r-- | tests/unstable.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/unstable.rs b/tests/unstable.rs new file mode 100644 index 0000000..0dba0a3 --- /dev/null +++ b/tests/unstable.rs @@ -0,0 +1,32 @@ +#![feature(proc_macro_hygiene, stmt_expr_attributes)] + +#[remain::sorted] +pub enum TestEnum { + A, + B, + C, +} + +#[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 => {} + } +} |