Closed
Description
Meta
- rustfmt version:
rustfmt 1.5.1-nightly (b44197ab 2022-09-05)
- Minimum reproducible repo: https://github.com/pan93412/rustfmt-format-code-in-doc-comments-issue-repro-220906
- rustfmt configuration:
format_code_in_doc_comments = true
Description
After enabling format_code_in_doc_comments
, rustfmt formats the following line comments to block comments – which is neither a documented nor an expected behavior.
struct TestStruct {
position_currency: String, // Currency for position of this contract. If not null, 1 contract = 1 positionCurrency.
pu: Option<i64>, // Previous event update sequense ("u" of previous message), -1 also means None
}
Expectation
rustfmt
should not touch this.
struct TestStruct {
position_currency: String, // Currency for position of this contract. If not null, 1 contract = 1 positionCurrency.
pu: Option<i64>, // Previous event update sequense ("u" of previous message), -1 also means None
}
Actual Result
struct TestStruct {
position_currency: String, /* Currency for position of this contract. If not null, 1 contract = 1 positionCurrency. */
pu: Option<i64>, /* Previous event update sequense ("u" of previous message), -1 also means None */
}