-
Couldn't load subscription status.
- Fork 961
Closed
Labels
A-commentsArea: commentsArea: commentsE-needs-testCall for participation: the issue is fixed but lacks a regression testCall for participation: the issue is fixed but lacks a regression testgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorsonly-with-optionRequires a non-default option value to reproduceRequires a non-default option value to reproduce
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.
Metadata
Metadata
Assignees
Labels
A-commentsArea: commentsArea: commentsE-needs-testCall for participation: the issue is fixed but lacks a regression testCall for participation: the issue is fixed but lacks a regression testgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorsonly-with-optionRequires a non-default option value to reproduceRequires a non-default option value to reproduce