]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/doc-comment-in-if-statement.stderr
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / test / ui / parser / doc-comment-in-if-statement.stderr
1 error: expected outer doc comment
2   --> $DIR/doc-comment-in-if-statement.rs:2:13
3    |
4 LL |     if true /*!*/ {}
5    |             ^^^^^
6    |
7    = note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
8
9 error: outer attributes are not allowed on `if` and `else` branches
10   --> $DIR/doc-comment-in-if-statement.rs:2:13
11    |
12 LL |     if true /*!*/ {}
13    |     --      ^^^^^ -- the attributes are attached to this branch
14    |     |       |
15    |     |       help: remove the attributes
16    |     the branch belongs to this `if`
17
18 error: aborting due to 2 previous errors
19