about summary refs log tree commit diff
path: root/tests/ui/error-codes/E0026.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0026.rs')
-rw-r--r--tests/ui/error-codes/E0026.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0026.rs b/tests/ui/error-codes/E0026.rs
new file mode 100644
index 00000000000..0b1ea1c7bcd
--- /dev/null
+++ b/tests/ui/error-codes/E0026.rs
@@ -0,0 +1,12 @@
+struct Thing {
+    x: u32,
+    y: u32
+}
+
+fn main() {
+    let thing = Thing { x: 0, y: 0 };
+    match thing {
+        Thing { x, y, z } => {}
+        //~^ ERROR struct `Thing` does not have a field named `z` [E0026]
+    }
+}