about summary refs log tree commit diff
path: root/tests/ui/error-codes/E0026-teach.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0026-teach.rs')
-rw-r--r--tests/ui/error-codes/E0026-teach.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0026-teach.rs b/tests/ui/error-codes/E0026-teach.rs
new file mode 100644
index 00000000000..7c51004ffe4
--- /dev/null
+++ b/tests/ui/error-codes/E0026-teach.rs
@@ -0,0 +1,14 @@
+// compile-flags: -Z teach
+
+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]
+    }
+}