about summary refs log tree commit diff
path: root/tests/ui/issues/issue-50618.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-50618.rs')
-rw-r--r--tests/ui/issues/issue-50618.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-50618.rs b/tests/ui/issues/issue-50618.rs
new file mode 100644
index 00000000000..5f762bc431e
--- /dev/null
+++ b/tests/ui/issues/issue-50618.rs
@@ -0,0 +1,19 @@
+struct Point {
+    pub x: u64,
+    pub y: u64,
+}
+
+const TEMPLATE: Point = Point {
+    x: 0,
+    y: 0
+};
+
+fn main() {
+    let _ = || {
+        Point {
+            nonexistent: 0,
+            //~^ ERROR struct `Point` has no field named `nonexistent`
+            ..TEMPLATE
+        }
+    };
+}