about summary refs log tree commit diff
path: root/tests/ui/structs/struct-duplicate-comma.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/structs/struct-duplicate-comma.fixed')
-rw-r--r--tests/ui/structs/struct-duplicate-comma.fixed15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/structs/struct-duplicate-comma.fixed b/tests/ui/structs/struct-duplicate-comma.fixed
new file mode 100644
index 00000000000..c804cf57aba
--- /dev/null
+++ b/tests/ui/structs/struct-duplicate-comma.fixed
@@ -0,0 +1,15 @@
+// run-rustfix
+// Issue #50974
+
+pub struct Foo {
+    pub a: u8,
+    pub b: u8
+}
+
+fn main() {
+    let _ = Foo {
+        a: 0,
+          //~^ ERROR expected identifier
+        b: 42
+    };
+}