summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/doc-before-struct-rbrace-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/parser/doc-before-struct-rbrace-2.rs')
-rw-r--r--src/test/ui/parser/doc-before-struct-rbrace-2.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/parser/doc-before-struct-rbrace-2.rs b/src/test/ui/parser/doc-before-struct-rbrace-2.rs
new file mode 100644
index 000000000..dda138f1a
--- /dev/null
+++ b/src/test/ui/parser/doc-before-struct-rbrace-2.rs
@@ -0,0 +1,9 @@
+struct X {
+ a: u8 /// document
+ //~^ ERROR found a documentation comment that doesn't document anything
+ //~| HELP maybe a comment was intended
+}
+
+fn main() {
+ let y = X {a: 1};
+}