]> git.lizzy.rs Git - rust.git/blobdiff - src/config/mod.rs
Add width for codeblocks in comments (#5372)
[rust.git] / src / config / mod.rs
index a5169528187834046e13ef5c8f6de8fa9fde1511..f49c18d3a4603a9804168664629c314181d7838f 100644 (file)
@@ -57,6 +57,8 @@
     // Comments. macros, and strings
     wrap_comments: bool, false, false, "Break comments to fit on the line";
     format_code_in_doc_comments: bool, false, false, "Format the code snippet in doc comments.";
+    doc_comment_code_block_width: usize, 100, false, "Maximum width for code snippets in doc \
+        comments. No effect unless format_code_in_doc_comments = true";
     comment_width: usize, 80, false,
         "Maximum length of comments. No effect unless wrap_comments = true";
     normalize_comments: bool, false, false, "Convert /* */ comments to // comments where possible";
@@ -532,6 +534,7 @@ fn test_dump_default_config() {
 single_line_if_else_max_width = 50
 wrap_comments = false
 format_code_in_doc_comments = false
+doc_comment_code_block_width = 100
 comment_width = 80
 normalize_comments = false
 normalize_doc_attributes = false