about summary refs log tree commit diff
path: root/tests/ui/parser/struct-filed-with-attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/struct-filed-with-attr.rs')
-rw-r--r--tests/ui/parser/struct-filed-with-attr.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/parser/struct-filed-with-attr.rs b/tests/ui/parser/struct-filed-with-attr.rs
new file mode 100644
index 00000000000..bfc78e15b5b
--- /dev/null
+++ b/tests/ui/parser/struct-filed-with-attr.rs
@@ -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() { }