about summary refs log tree commit diff
path: root/tests/ui/parser/doc-before-bad-variant.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/doc-before-bad-variant.rs')
-rw-r--r--tests/ui/parser/doc-before-bad-variant.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/parser/doc-before-bad-variant.rs b/tests/ui/parser/doc-before-bad-variant.rs
new file mode 100644
index 00000000000..bfede28c108
--- /dev/null
+++ b/tests/ui/parser/doc-before-bad-variant.rs
@@ -0,0 +1,6 @@
+enum TestEnum {
+    Works,
+    /// Some documentation
+    Self, //~ ERROR expected identifier, found keyword `Self`
+    //~^ HELP enum variants can be
+}