Closed
Description
When enabling format_code_in_doc_comments
, the formatter reports that there is a syntax issue in a code block. However the syntax issue source location seems to be confusing/ambigious:
Running rustfmt
on the following code snippet produces a confusing error message:
/// Some doc comment with code snippet:
///```
/// '\u{1F}
/// ```
pub struct Code {}
fn main() {}
The error that is produced:
error[E0762]: unterminated character literal
--> <stdin>:2:5
|
2 | '\u{1F}
| ^^^^^^^
This is not explicitly a bug, but nonetheless is confusing as it does not indicate the true origin of the issue.