summaryrefslogtreecommitdiffstats
path: root/src/test/ui/structs-enums/numeric-fields.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/structs-enums/numeric-fields.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/structs-enums/numeric-fields.rs b/src/test/ui/structs-enums/numeric-fields.rs
new file mode 100644
index 000000000..6ff3afc38
--- /dev/null
+++ b/src/test/ui/structs-enums/numeric-fields.rs
@@ -0,0 +1,12 @@
+// run-pass
+struct S(u8, u16);
+
+fn main() {
+ let s = S{1: 10, 0: 11};
+ match s {
+ S{0: a, 1: b, ..} => {
+ assert_eq!(a, 11);
+ assert_eq!(b, 10);
+ }
+ }
+}