summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/doc-comment-in-if-statement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/doc-comment-in-if-statement.rs')
-rw-r--r--tests/ui/parser/doc-comment-in-if-statement.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/parser/doc-comment-in-if-statement.rs b/tests/ui/parser/doc-comment-in-if-statement.rs
new file mode 100644
index 000000000..343eac1b8
--- /dev/null
+++ b/tests/ui/parser/doc-comment-in-if-statement.rs
@@ -0,0 +1,5 @@
+fn main() {
+ if true /*!*/ {}
+ //~^ ERROR outer attributes are not allowed on
+ //~| ERROR expected outer doc comment
+}