Remove same_line_attributes config option
This commit is contained in:
parent
3e29fe3330
commit
279acda4c4
6 changed files with 0 additions and 135 deletions
|
@ -246,53 +246,6 @@ fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## `same_line_attributes`
|
|
||||||
|
|
||||||
Try to put attributes on the same line as fields and variants
|
|
||||||
|
|
||||||
- **Default value**: `true`
|
|
||||||
- **Possible values**: `true`, `false`
|
|
||||||
- **Stable**: No
|
|
||||||
|
|
||||||
#### `true` (default):
|
|
||||||
|
|
||||||
```rust
|
|
||||||
struct Lorem {
|
|
||||||
#[serde(rename = "Ipsum")] ipsum: usize,
|
|
||||||
#[serde(rename = "Dolor")] dolor: usize,
|
|
||||||
#[serde(rename = "Amet")] amet: usize,
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Lorem {
|
|
||||||
#[serde(skip_serializing)] Ipsum,
|
|
||||||
#[serde(skip_serializing)] Dolor,
|
|
||||||
#[serde(skip_serializing)] Amet,
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `false`:
|
|
||||||
|
|
||||||
```rust
|
|
||||||
struct Lorem {
|
|
||||||
#[serde(rename = "Ipsum")]
|
|
||||||
ipsum: usize,
|
|
||||||
#[serde(rename = "Dolor")]
|
|
||||||
dolor: usize,
|
|
||||||
#[serde(rename = "Amet")]
|
|
||||||
amet: usize,
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Lorem {
|
|
||||||
#[serde(skip_serializing)]
|
|
||||||
Ipsum,
|
|
||||||
#[serde(skip_serializing)]
|
|
||||||
Dolor,
|
|
||||||
#[serde(skip_serializing)]
|
|
||||||
Amet,
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## `use_small_heuristics`
|
## `use_small_heuristics`
|
||||||
|
|
||||||
Whether to use different formatting for items and expressions if they satisfy a heuristic notion of 'small'.
|
Whether to use different formatting for items and expressions if they satisfy a heuristic notion of 'small'.
|
||||||
|
|
|
@ -648,8 +648,6 @@ create_config! {
|
||||||
threshold.";
|
threshold.";
|
||||||
remove_blank_lines_at_start_or_end_of_block: bool, true, false,
|
remove_blank_lines_at_start_or_end_of_block: bool, true, false,
|
||||||
"Remove blank lines at start or end of a block";
|
"Remove blank lines at start or end of a block";
|
||||||
same_line_attributes: bool, true, false,
|
|
||||||
"Try to put attributes on the same line as fields and variants.";
|
|
||||||
match_arm_blocks: bool, true, false, "Wrap the body of arms in blocks when it does not fit on \
|
match_arm_blocks: bool, true, false, "Wrap the body of arms in blocks when it does not fit on \
|
||||||
the same line with the pattern of arms";
|
the same line with the pattern of arms";
|
||||||
force_multiline_blocks: bool, false, false,
|
force_multiline_blocks: bool, false, false,
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
// rustfmt-same_line_attributes: false
|
|
||||||
// Option to place attributes on the same line as fields and variants where possible
|
|
||||||
|
|
||||||
enum Lorem {
|
|
||||||
#[ serde(skip_serializing) ]
|
|
||||||
Ipsum,
|
|
||||||
#[ serde(skip_serializing) ]
|
|
||||||
Dolor,
|
|
||||||
#[ serde(skip_serializing) ]
|
|
||||||
Amet,
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Lorem {
|
|
||||||
#[ serde(rename = "Ipsum") ]
|
|
||||||
ipsum: usize,
|
|
||||||
#[ serde(rename = "Dolor") ]
|
|
||||||
dolor: usize,
|
|
||||||
#[ serde(rename = "Amet") ]
|
|
||||||
amet: usize,
|
|
||||||
}
|
|
||||||
|
|
||||||
// #1943
|
|
||||||
pub struct Bzip2 {
|
|
||||||
# [ serde (rename = "level") ]
|
|
||||||
level: i32 ,
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
// rustfmt-same_line_attributes: true
|
|
||||||
// Option to place attributes on the same line as fields and variants where possible
|
|
||||||
|
|
||||||
enum Lorem {
|
|
||||||
#[ serde(skip_serializing) ]
|
|
||||||
Ipsum,
|
|
||||||
#[ serde(skip_serializing) ]
|
|
||||||
Dolor,
|
|
||||||
#[ serde(skip_serializing) ]
|
|
||||||
Amet,
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Lorem {
|
|
||||||
#[ serde(rename = "Ipsum") ]
|
|
||||||
ipsum: usize,
|
|
||||||
#[ serde(rename = "Dolor") ]
|
|
||||||
dolor: usize,
|
|
||||||
#[ serde(rename = "Amet") ]
|
|
||||||
amet: usize,
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
// rustfmt-same_line_attributes: false
|
|
||||||
// Option to place attributes on the same line as fields and variants where possible
|
|
||||||
|
|
||||||
enum Lorem {
|
|
||||||
#[serde(skip_serializing)]
|
|
||||||
Ipsum,
|
|
||||||
#[serde(skip_serializing)]
|
|
||||||
Dolor,
|
|
||||||
#[serde(skip_serializing)]
|
|
||||||
Amet,
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Lorem {
|
|
||||||
#[serde(rename = "Ipsum")]
|
|
||||||
ipsum: usize,
|
|
||||||
#[serde(rename = "Dolor")]
|
|
||||||
dolor: usize,
|
|
||||||
#[serde(rename = "Amet")]
|
|
||||||
amet: usize,
|
|
||||||
}
|
|
||||||
|
|
||||||
// #1943
|
|
||||||
pub struct Bzip2 {
|
|
||||||
#[serde(rename = "level")]
|
|
||||||
level: i32,
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
// rustfmt-same_line_attributes: true
|
|
||||||
// Option to place attributes on the same line as fields and variants where possible
|
|
||||||
|
|
||||||
enum Lorem {
|
|
||||||
#[serde(skip_serializing)] Ipsum,
|
|
||||||
#[serde(skip_serializing)] Dolor,
|
|
||||||
#[serde(skip_serializing)] Amet,
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Lorem {
|
|
||||||
#[serde(rename = "Ipsum")] ipsum: usize,
|
|
||||||
#[serde(rename = "Dolor")] dolor: usize,
|
|
||||||
#[serde(rename = "Amet")] amet: usize,
|
|
||||||
}
|
|
Loading…
Reference in a new issue