about summary refs log tree commit diff
path: root/tests/ui/parser/struct-filed-with-attr.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/struct-filed-with-attr.fixed')
-rw-r--r--tests/ui/parser/struct-filed-with-attr.fixed18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/parser/struct-filed-with-attr.fixed b/tests/ui/parser/struct-filed-with-attr.fixed
new file mode 100644
index 00000000000..a799ec8ca2e
--- /dev/null
+++ b/tests/ui/parser/struct-filed-with-attr.fixed
@@ -0,0 +1,18 @@
+// Issue: 100461, Try to give a helpful diagnostic even when the next struct field has an attribute.
+// run-rustfix
+
+struct Feelings {
+    owo: bool,
+    //~^ ERROR expected `,`, or `}`, found `#`
+    #[allow(unused)]
+    uwu: bool,
+}
+
+impl Feelings {
+    #[allow(unused)]
+    fn hmm(&self) -> bool {
+        self.owo
+    }
+}
+
+fn main() { }