about summary refs log tree commit diff
path: root/tests/ui/suggestions/struct-initializer-comma.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/struct-initializer-comma.fixed')
-rw-r--r--tests/ui/suggestions/struct-initializer-comma.fixed15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/suggestions/struct-initializer-comma.fixed b/tests/ui/suggestions/struct-initializer-comma.fixed
new file mode 100644
index 00000000000..6a4ee39b16d
--- /dev/null
+++ b/tests/ui/suggestions/struct-initializer-comma.fixed
@@ -0,0 +1,15 @@
+// run-rustfix
+
+pub struct Foo {
+    pub first: bool,
+    pub second: u8,
+}
+
+fn main() {
+    let _ = Foo {
+        //~^ ERROR missing field
+        first: true,
+        second: 25
+        //~^ ERROR expected one of
+    };
+}