error unterminated-comment
Блочный комментарий не закрыт.
What it means#
Block comments /* ... */ may be nested (§1.1), so every /* needs its own closing */. The lexer reports this code when the end of the file is reached while at least one block comment is still open. Nesting is the usual culprit: a */ closes only the innermost comment.
Example#
/* outer
/* inner */
fn main() {} // <- unterminated-comment (the outer comment never closes)error
unterminated-comment
How to fix#
/* outer
/* inner */
*/
fn main() {}Close every opened comment. To disable a region that already contains block comments, rely on nesting, or use // line comments.