-
Notifications
You must be signed in to change notification settings - Fork 896
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer light_rewrite_comment if it is not a doccomment (#5536)
Fixes 5533, 5568, 5907 Prevent `format_code_in_doc_comments=true` from affecting how non-doc comments are formatted. --------- Co-authored-by: Yacin Tmimi <[email protected]>
- Loading branch information
Showing
4 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// rustfmt-max_width: 119 | ||
// rustfmt-format_code_in_doc_comments: true | ||
|
||
mod libs { | ||
fn mrbgems_sources() { | ||
[ | ||
"mrbgems/mruby-compiler/core/codegen.c", // Ruby parser and bytecode generation | ||
"mrbgems/mruby-compiler/core/y.tab.c", // Ruby parser and bytecode generation | ||
"mrbgems/mruby-metaprog/src/metaprog.c", // APIs on Kernel and Module for accessing classes and variables | ||
"mrbgems/mruby-method/src/method.c", // `Method`, `UnboundMethod`, and method APIs on Kernel and Module | ||
"mrbgems/mruby-pack/src/pack.c", // Array#pack and String#unpack | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// rustfmt-format_code_in_doc_comments: true | ||
|
||
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// rustfmt-format_code_in_doc_comments: true | ||
|
||
// ``` | ||
// [ | ||
// ] | ||
// ``` |