1 error[E0753]: expected outer doc comment
2 --> $DIR/issue-30318.rs:5:1
4 LL | //! Misplaced comment...
5 | ^^^^^^^^^^^^^^^^^^^^^^^^
8 | ------------ the inner doc comment doesn't annotate this function
10 help: to annotate the function, change the doc comment from inner to outer style
12 LL | /// Misplaced comment...
15 error: an inner attribute is not permitted in this context
16 --> $DIR/issue-30318.rs:9:1
21 | ------------ the inner attribute doesn't annotate this function
23 = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
24 help: to annotate the function, change the attribute from inner to outer style
30 error[E0753]: expected outer doc comment
31 --> $DIR/issue-30318.rs:13:1
33 LL | /*! Misplaced comment... */
34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
37 | ------------ the inner doc comment doesn't annotate this function
39 help: to annotate the function, change the doc comment from inner to outer style
41 LL | /** Misplaced comment... */
44 error[E0753]: expected outer doc comment
45 --> $DIR/issue-30318.rs:19:1
47 LL | //! Misplaced comment...
48 | ^^^^^^^^^^^^^^^^^^^^^^^^
50 = note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
51 help: you might have meant to write a regular comment
53 LL - //! Misplaced comment...
54 LL + // Misplaced comment...
57 error[E0753]: expected outer doc comment
58 --> $DIR/issue-30318.rs:23:1
60 LL | /*! Misplaced comment... */
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
63 = note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before items
64 help: you might have meant to write a regular comment
66 LL - /*! Misplaced comment... */
67 LL + /* Misplaced comment... */
70 error: expected item after doc comment
71 --> $DIR/issue-30318.rs:23:1
73 LL | //! Misplaced comment...
74 | ------------------------ other attributes here
76 LL | /*! Misplaced comment... */
77 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ this doc comment doesn't document anything
79 error: aborting due to 6 previous errors
81 For more information about this error, try `rustc --explain E0753`.