about summary refs log tree commit diff
path: root/tests/ui/parser/removed-syntax-with-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/removed-syntax-with-2.rs')
-rw-r--r--tests/ui/parser/removed-syntax-with-2.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/parser/removed-syntax-with-2.rs b/tests/ui/parser/removed-syntax-with-2.rs
new file mode 100644
index 00000000000..451057c66a1
--- /dev/null
+++ b/tests/ui/parser/removed-syntax-with-2.rs
@@ -0,0 +1,11 @@
+fn main() {
+    struct S {
+        foo: (),
+        bar: (),
+    }
+
+    let a = S { foo: (), bar: () };
+    let b = S { foo: (), with a };
+    //~^ ERROR expected one of `,`, `:`, or `}`, found `a`
+    //~| ERROR missing field `bar` in initializer of `S`
+}