about summary refs log tree commit diff
path: root/tests/ui/binding/match-larger-const.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/binding/match-larger-const.rs')
-rw-r--r--tests/ui/binding/match-larger-const.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/binding/match-larger-const.rs b/tests/ui/binding/match-larger-const.rs
new file mode 100644
index 00000000000..6f9a353207f
--- /dev/null
+++ b/tests/ui/binding/match-larger-const.rs
@@ -0,0 +1,12 @@
+// run-pass
+#[derive(Eq, PartialEq)]
+pub struct Data([u8; 4]);
+
+const DATA: Data = Data([1, 2, 3, 4]);
+
+fn main() {
+    match DATA {
+        DATA => (),
+        _ => (),
+    }
+}