-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Labels
a-commentsgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorsneeds-testonly-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-commentsgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorsneeds-testonly-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproduce