summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/removed-syntax-with-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/removed-syntax-with-2.rs')
-rw-r--r--src/test/ui/parser/removed-syntax-with-2.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/parser/removed-syntax-with-2.rs b/src/test/ui/parser/removed-syntax-with-2.rs
new file mode 100644
index 000000000..451057c66
--- /dev/null
+++ b/src/test/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`
+}