rust/src/test/ui/parser/doc-comment-in-if-statement.stderr

20 lines
604 B
Plaintext
Raw Normal View History

error: expected outer doc comment
--> $DIR/doc-comment-in-if-statement.rs:2:13
|
LL | if true /*!*/ {}
| ^^^^^
|
= note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
2020-03-07 10:16:29 -06:00
error: outer attributes are not allowed on `if` and `else` branches
--> $DIR/doc-comment-in-if-statement.rs:2:13
|
LL | if true /*!*/ {}
2020-03-07 10:16:29 -06:00
| -- ^^^^^ -- the attributes are attached to this branch
| | |
2020-03-07 10:16:29 -06:00
| | help: remove the attributes
| the branch belongs to this `if`
error: aborting due to 2 previous errors