make rustfmt-normalize_comments false by default
This commit is contained in:
parent
5349336192
commit
846d7ad387
@ -393,7 +393,7 @@ create_config! {
|
||||
take_source_hints: bool, true, "Retain some formatting characteristics from the source code";
|
||||
hard_tabs: bool, false, "Use tab characters for indentation, spaces for alignment";
|
||||
wrap_comments: bool, false, "Break comments to fit on the line";
|
||||
normalize_comments: bool, true, "Convert /* */ comments to // comments where possible";
|
||||
normalize_comments: bool, false, "Convert /* */ comments to // comments where possible";
|
||||
wrap_match_arms: bool, true, "Wrap multiline match arms in blocks";
|
||||
match_block_trailing_comma: bool, false,
|
||||
"Put a trailing comma after a block based match arm (non-block arms are not affected)";
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-single_line_if_else_max_width: 0
|
||||
// rustfmt-chain_indent: Visual
|
||||
// rustfmt-chain_base_indent: Visual
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-single_line_if_else_max_width: 0
|
||||
// Test chain formatting.
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// Closures
|
||||
|
||||
fn main() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
|
||||
//! Doc comment
|
||||
|
@ -1,5 +1,3 @@
|
||||
// rustfmt-normalize_comments: false
|
||||
|
||||
//! Doc comment
|
||||
fn test() {
|
||||
// comment
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
|
||||
//@ special comment
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
/* Block comments followed by CRLF newlines should not an extra newline at the end */
|
||||
|
||||
/* Something else */
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// Test expressions
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
extern "C" {
|
||||
fn c_func(x: *mut *mut libc::c_void);
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-fn_args_layout: BlockAlways
|
||||
// rustfmt-fn_args_density: Vertical
|
||||
// rustfmt-fn_arg_indent: Tabbed
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
fn simple(/*pre-comment on a function!?*/ i: i32/*yes, it's possible! */
|
||||
,response: NoWay /* hose */) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-fn_args_layout: Block
|
||||
|
||||
fn foo() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-single_line_if_else_max_width: 0
|
||||
// rustfmt-wrap_comments: true
|
||||
// rustfmt-hard_tabs: true
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
impl Foo for Bar { fn foo() { "hi" } }
|
||||
|
||||
pub impl Foo for Bar {
|
||||
|
@ -1,3 +1,5 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
// Imports.
|
||||
|
||||
// Long import.
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
fn main() {
|
||||
match x {
|
||||
S(true , .., true ) => (),
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
enum E {
|
||||
A, //* I am not a block comment (caused panic)
|
||||
B,
|
||||
|
@ -1,3 +1,5 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
fn main() {
|
||||
if /* shouldn't be dropped
|
||||
shouldn't be dropped */
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// FIXME(#919)
|
||||
|
||||
trait NameC { /* comment */ }
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
itemmacro!(this, is.now() .formatted(yay));
|
||||
|
||||
itemmacro!(really, long.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb() .is.formatted());
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// Match expressions.
|
||||
|
||||
fn foo() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// Test of lots of random stuff.
|
||||
// FIXME split this into multiple, self-contained tests.
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-condense_wildcard_suffices: true
|
||||
|
||||
fn main() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// Struct literal expressions.
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// rustfmt-struct_lit_multiline_style: ForceMulti
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// rustfmt-struct_lit_style: Visual
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// rustfmt-struct_lit_style: Visual
|
||||
// rustfmt-struct_lit_multiline_style: ForceMulti
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
|
||||
/// A Doc comment
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
fn types() {
|
||||
let x: [ Vec < _ > ] = [];
|
||||
let y: * mut [ SomeType ; konst_funk() ] = expr();
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
type PrivateTest<'a, I> = (Box<Parser<Input=I, Output=char> + 'a>, Box<Parser<Input=I, Output=char> + 'a>);
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-single_line_if_else_max_width: 0
|
||||
// rustfmt-chain_indent: Visual
|
||||
// rustfmt-chain_base_indent: Visual
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-single_line_if_else_max_width: 0
|
||||
// Test chain formatting.
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// Closures
|
||||
|
||||
fn main() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
|
||||
//! Doc comment
|
||||
|
@ -1,5 +1,3 @@
|
||||
// rustfmt-normalize_comments: false
|
||||
|
||||
//! Doc comment
|
||||
fn test() {
|
||||
// comment
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
|
||||
//@ special comment
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// Block comments followed by CRLF newlines should not an extra newline at the end
|
||||
|
||||
// Something else
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// Test expressions
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
extern "C" {
|
||||
fn c_func(x: *mut *mut libc::c_void);
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-fn_args_layout: BlockAlways
|
||||
// rustfmt-fn_args_density: Vertical
|
||||
// rustfmt-fn_arg_indent: Tabbed
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
fn simple(// pre-comment on a function!?
|
||||
i: i32, // yes, it's possible!
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-fn_args_layout: Block
|
||||
|
||||
fn foo() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-single_line_if_else_max_width: 0
|
||||
// rustfmt-wrap_comments: true
|
||||
// rustfmt-hard_tabs: true
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
impl Foo for Bar {
|
||||
fn foo() {
|
||||
"hi"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
// Imports.
|
||||
|
||||
// Long import.
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
fn main() {
|
||||
match x {
|
||||
S(true, .., true) => (),
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
enum E {
|
||||
A, //* I am not a block comment (caused panic)
|
||||
B,
|
||||
|
@ -1,3 +1,5 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
fn main() {
|
||||
if
|
||||
// shouldn't be dropped
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// FIXME(#919)
|
||||
|
||||
trait NameC {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
itemmacro!(this, is.now().formatted(yay));
|
||||
|
||||
itemmacro!(really,
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// Match expressions.
|
||||
|
||||
fn foo() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// Test of lots of random stuff.
|
||||
// FIXME split this into multiple, self-contained tests.
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-condense_wildcard_suffices: true
|
||||
|
||||
fn main() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// Struct literal expressions.
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// rustfmt-struct_lit_multiline_style: ForceMulti
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// rustfmt-struct_lit_style: Visual
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
// rustfmt-struct_lit_style: Visual
|
||||
// rustfmt-struct_lit_multiline_style: ForceMulti
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
// rustfmt-wrap_comments: true
|
||||
|
||||
/// A Doc comment
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
fn types() {
|
||||
let x: [Vec<_>] = [];
|
||||
let y: *mut [SomeType; konst_funk()] = expr();
|
||||
|
@ -1,3 +1,4 @@
|
||||
// rustfmt-normalize_comments: true
|
||||
|
||||
type PrivateTest<'a, I> = (Box<Parser<Input = I, Output = char> + 'a>,
|
||||
Box<Parser<Input = I, Output = char> + 'a>);
|
||||
|
Loading…
x
Reference in New Issue
Block a user