summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/removed-syntax-field-let-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/removed-syntax-field-let-2.rs')
-rw-r--r--tests/ui/parser/removed-syntax-field-let-2.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/parser/removed-syntax-field-let-2.rs b/tests/ui/parser/removed-syntax-field-let-2.rs
new file mode 100644
index 000000000..7ff91b476
--- /dev/null
+++ b/tests/ui/parser/removed-syntax-field-let-2.rs
@@ -0,0 +1,12 @@
+struct Foo {
+ let x: i32,
+ //~^ ERROR expected identifier, found keyword
+ let y: i32,
+ //~^ ERROR expected identifier, found keyword
+}
+
+fn main() {
+ let _ = Foo {
+ //~^ ERROR missing fields `x` and `y` in initializer of `Foo`
+ };
+}