From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/parser/struct-filed-with-attr.fixed | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/ui/parser/struct-filed-with-attr.fixed (limited to 'tests/ui/parser/struct-filed-with-attr.fixed') 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 000000000..a799ec8ca --- /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() { } -- cgit v1.2.3