diff options
Diffstat (limited to 'tests/ui/unsorted-match-stable.rs')
-rw-r--r-- | tests/ui/unsorted-match-stable.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/unsorted-match-stable.rs b/tests/ui/unsorted-match-stable.rs new file mode 100644 index 0000000..f85202f --- /dev/null +++ b/tests/ui/unsorted-match-stable.rs @@ -0,0 +1,20 @@ +enum E { + Aaa, + Bbb(u8, u8), + Ccc(u8), + Ddd { u: u8 }, +} + +#[remain::check] +fn main() { + let value = E::Aaa; + + #[sorted] + match value { + E::Aaa => {} + E::Ccc(_) => {} + #[unsorted] + E::Ddd { u: _ } => {} + E::Bbb(_, _) => {} + } +} |