]> git.lizzy.rs Git - rust.git/blobdiff - Configurations.md
Merge pull request #2213 from topecongiro/issue-2212
[rust.git] / Configurations.md
index 5c75030d480846ed7be2ac4f3f15f78c930c33c6..7726193fafe24c7ba6a644a9b283ce3445a988f7 100644 (file)
@@ -5,8 +5,7 @@ Rustfmt is designed to be very configurable. You can create a TOML file called `
 A possible content of `rustfmt.toml` or `.rustfmt.toml` might look like this:
 
 ```toml
-array_layout = "Block"
-array_width = 80
+indent_style = "Block"
 reorder_imported_names = true
 ```
 
@@ -14,47 +13,17 @@ reorder_imported_names = true
 
 Below you find a detailed visual guide on all the supported configuration options of rustfmt:
 
-## `array_horizontal_layout_threshold`
 
-How many elements array must have before rustfmt uses horizontal layout.  
-Use this option to prevent a huge array from being vertically formatted.
+## `indent_style`
 
-- **Default value**: `0`
-- **Possible values**: any positive integer
-
-**Note:** A value of `0` results in [`array_layout`](#array_layout) being applied regardless of a line's width.
-
-#### `0`:
-
-```rust
-// Each element will be placed on its own line.
-let a = vec![
-    0,
-    1,
-    2,
-    3,
-    4,
-    ...
-    999,
-    1000,
-];
-```
-
-#### `1000`:
-```rust
-// Each element will be placed on the same line as much as possible.
-let a = vec![0, 1, 2, 3, 4, ...
-             ..., 999, 1000];
-```
-
-## `array_layout`
-
-Indent on arrays
+Indent on expressions or items.
 
 - **Default value**: `"Block"`
 - **Possible values**: `"Block"`, `"Visual"`
 
-#### `"Block"`:
+### Array
+
+#### `"Block"` (default):
 
 ```rust
 let lorem = vec![
@@ -80,125 +49,374 @@ let lorem = vec!["ipsum",
                  "elit"];
 ```
 
-## `array_width`
+### Control flow
 
-Maximum width of an array literal before falling back to vertical formatting
+#### `"Block"` (default):
 
-- **Default value**: `60`
-- **Possible values**: any positive integer
+```rust
+if lorem_ipsum &&
+    dolor_sit &&
+    amet_consectetur
+{
+    // ...
+}
+```
 
-**Note:** A value of `0` results in [`array_layout`](#array_layout) being applied regardless of a line's width.
+#### `"Visual"`:
 
-#### Lines shorter than `array_width`:
 ```rust
-let lorem =
-    vec!["ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"];
+if lorem_ipsum &&
+   dolor_sit &&
+   amet_consectetur {
+    // ...
+}
 ```
 
-#### Lines longer than `array_width`:
-See [`array_layout`](#array_layout).
+See also: [`control_brace_style`](#control_brace_style).
 
-## `chain_indent`
+### Function arguments
 
-Indentation of chain
+#### `"Block"` (default):
 
-- **Default value**: `"Block"`
-- **Possible values**: `"Block"`, `"Visual"`
+```rust
+fn lorem() {}
 
-#### `"Block"`:
+fn lorem(ipsum: usize) {}
+
+fn lorem(
+    ipsum: usize,
+    dolor: usize,
+    sit: usize,
+    amet: usize,
+    consectetur: usize,
+    adipiscing: usize,
+    elit: usize,
+) {
+    // body
+}
+```
+
+#### `"Visual"`:
 
 ```rust
-let lorem = ipsum
-    .dolor()
-    .sit()
-    .amet()
-    .consectetur()
-    .adipiscing()
-    .elit();
+fn lorem() {}
+
+fn lorem(ipsum: usize) {}
+
+fn lorem(ipsum: usize,
+         dolor: usize,
+         sit: usize,
+         amet: usize,
+         consectetur: usize,
+         adipiscing: usize,
+         elit: usize) {
+    // body
+}
+```
+
+### Function calls
+
+#### `"Block"` (default):
+
+```rust
+lorem(
+    "lorem",
+    "ipsum",
+    "dolor",
+    "sit",
+    "amet",
+    "consectetur",
+    "adipiscing",
+    "elit",
+);
 ```
 
 #### `"Visual"`:
 
 ```rust
-let lorem = ipsum.dolor()
-                 .sit()
-                 .amet()
-                 .consectetur()
-                 .adipiscing()
-                 .elit();
+lorem("lorem",
+      "ipsum",
+      "dolor",
+      "sit",
+      "amet",
+      "consectetur",
+      "adipiscing",
+      "elit");
 ```
 
-See also [`chain_one_line_max`](#chain_one_line_max).
+### Generics
 
-## `chain_one_line_max`
+#### `"Block"` (default):
 
-Maximum length of a chain to fit on a single line
+```rust
+fn lorem<
+    Ipsum: Eq = usize,
+    Dolor: Eq = usize,
+    Sit: Eq = usize,
+    Amet: Eq = usize,
+    Adipiscing: Eq = usize,
+    Consectetur: Eq = usize,
+    Elit: Eq = usize
+>(
+    ipsum: Ipsum,
+    dolor: Dolor,
+    sit: Sit,
+    amet: Amet,
+    adipiscing: Adipiscing,
+    consectetur: Consectetur,
+    elit: Elit,
+) -> T {
+    // body
+}
+```
 
-- **Default value**: `60`
-- **Possible values**: any positive integer
+#### `"Visual"`:
+
+```rust
+fn lorem<Ipsum: Eq = usize,
+         Dolor: Eq = usize,
+         Sit: Eq = usize,
+         Amet: Eq = usize,
+         Adipiscing: Eq = usize,
+         Consectetur: Eq = usize,
+         Elit: Eq = usize>
+    (ipsum: Ipsum,
+     dolor: Dolor,
+     sit: Sit,
+     amet: Amet,
+     adipiscing: Adipiscing,
+     consectetur: Consectetur,
+     elit: Elit)
+     -> T {
+    // body
+}
+```
+
+#### Struct
+
+#### `"Block"` (default):
 
-#### Lines shorter than `chain_one_line_max`:
 ```rust
-let lorem = ipsum.dolor().sit().amet().consectetur().adipiscing().elit();
+let lorem = Lorem {
+    ipsum: dolor,
+    sit: amet,
+};
 ```
 
-#### Lines longer than `chain_one_line_max`:
-See [`chain_indent`](#chain_indent).
+#### `"Visual"`:
 
-## `chain_split_single_child`
+```rust
+let lorem = Lorem { ipsum: dolor,
+                    sit: amet, };
+```
 
-Split a chain with a single child if its length exceeds [`chain_one_line_max`](#chain_one_line_max).
+See also: [`struct_lit_single_line`](#struct_lit_single_line), [`indent_style`](#indent_style).
 
-- **Default value**: `false`
-- **Possible values**: `false`, `true`
+### Where predicates
 
-#### `false`
+#### `"Block"` (default):
 
 ```rust
-let files = fs::read_dir("tests/coverage/source").expect("Couldn't read source dir");
+fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
+where 
+    Ipsum: Eq,
+    Dolor: Eq,
+    Sit: Eq,
+    Amet: Eq
+{
+    // body
+}
 ```
 
-#### `true`
+#### `"Visual"`:
 
 ```rust
-let files = fs::read_dir("tests/coverage/source")
-    .expect("Couldn't read source dir");
+fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
+    where Ipsum: Eq,
+          Dolor: Eq,
+          Sit: Eq,
+          Amet: Eq
+{
+    // body
+}
 ```
 
-See also [`chain_one_line_max`](#chain_one_line_max).
 
-## `closure_block_indent_threshold`
+## `same_line_attributes`
+
+Try to put attributes on the same line as fields and variants
+
+- **Default value**: `true`
+- **Possible values**: `true`, `false`
+
+#### `true` (default):
+
+```rust
+struct Lorem {
+    #[serde(rename = "Ipsum")] ipsum: usize,
+    #[serde(rename = "Dolor")] dolor: usize,
+    #[serde(rename = "Amet")] amet: usize,
+}
 
-How many lines a closure must have before it is block indented. -1 means never use block indent.
+enum Lorem {
+    #[serde(skip_serializing)] Ipsum,
+    #[serde(skip_serializing)] Dolor,
+    #[serde(skip_serializing)] Amet,
+}
+```
 
-- **Default value**: `7`
-- **Possible values**: `-1`, or any positive integer
+#### `false`:
 
-#### Closures shorter than `closure_block_indent_threshold`:
 ```rust
-lorem_ipsum(|| {
-                println!("lorem");
-                println!("ipsum");
-                println!("dolor");
-                println!("sit");
-                println!("amet");
-            });
+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,
+}
 ```
 
-#### Closures longer than `closure_block_indent_threshold`:
+## `use_small_heuristics`
+
+Whether to use different formatting for items and expressions if they satisfy a heuristic notion of 'small'.
+
+- **Default value**: `true`
+- **Possible values**: `true`, `false`
+
+#### `true` (default):
+
 ```rust
-lorem_ipsum(|| {
-    println!("lorem");
-    println!("ipsum");
-    println!("dolor");
-    println!("sit");
-    println!("amet");
-    println!("consectetur");
-    println!("adipiscing");
-    println!("elit");
-});
+enum Lorem {
+    Ipsum,
+    Dolor(bool),
+    Sit { amet: Consectetur, adipiscing: Elit },
+}
+
+fn main() {
+    lorem(
+        "lorem",
+        "ipsum",
+        "dolor",
+        "sit",
+        "amet",
+        "consectetur",
+        "adipiscing",
+    );
+
+    let lorem = Lorem { ipsum: dolor, sit: amet };
+
+    let lorem = if ipsum { dolor } else { sit };
+}
 ```
 
+#### `false`:
+
+```rust
+enum Lorem {
+    Ipsum,
+    Dolor(bool),
+    Sit {
+        amet: Consectetur,
+        adipiscing: Elit,
+    },
+}
+
+fn main() {
+    lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing");
+
+    let lorem = Lorem {
+        ipsum: dolor,
+        sit: amet,
+    };
+
+    let lorem = if ipsum {
+        dolor
+    } else {
+        sit
+    };
+}
+```
+
+## `binop_separator`
+
+Where to put a binary operator when a binary expression goes multiline.
+
+- **Default value**: `"Front"`
+- **Possible values**: `"Front"`, `"Back"`
+
+#### `"Front"` (default):
+
+```rust
+let or = foo
+    || bar
+    || foobar;
+
+let sum = 1234
+    + 5678
+    + 910;
+
+let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+    ..bbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
+```
+
+#### `"Back"`:
+
+```rust
+let or = foo ||
+    bar ||
+    foobar;
+
+let sum = 1234 +
+    5678 +
+    910;
+
+let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..
+    bbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
+```
+
+## `chain_indent`
+
+Indentation of chain
+
+- **Default value**: `"Block"`
+- **Possible values**: `"Block"`, `"Visual"`
+
+#### `"Block"` (default):
+
+```rust
+let lorem = ipsum
+    .dolor()
+    .sit()
+    .amet()
+    .consectetur()
+    .adipiscing()
+    .elit();
+```
+
+#### `"Visual"`:
+
+```rust
+let lorem = ipsum.dolor()
+                 .sit()
+                 .amet()
+                 .consectetur()
+                 .adipiscing()
+                 .elit();
+```
+
+
+
 ## `combine_control_expr`
 
 Combine control expressions with function calls.
@@ -206,7 +424,7 @@ Combine control expressions with function calls.
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
 
-#### `true`
+#### `true` (default):
 
 ```rust
 fn example() {
@@ -250,9 +468,60 @@ fn example() {
 }
 ```
 
-#### `false`
+#### `false`:
 
 ```rust
+fn example() {
+    // If
+    foo!(
+        if x {
+            foo();
+        } else {
+            bar();
+        }
+    );
+
+    // IfLet
+    foo!(
+        if let Some(..) = x {
+            foo();
+        } else {
+            bar();
+        }
+    );
+
+    // While
+    foo!(
+        while x {
+            foo();
+            bar();
+        }
+    );
+
+    // WhileLet
+    foo!(
+        while let Some(..) = x {
+            foo();
+            bar();
+        }
+    );
+
+    // ForLoop
+    foo!(
+        for x in y {
+            foo();
+            bar();
+        }
+    );
+
+    // Loop
+    foo!(
+        loop {
+            foo();
+            bar();
+        }
+    );
+}
 ```
 
 ## `comment_width`
@@ -284,7 +553,7 @@ Replace strings of _ wildcards by a single .. in tuple patterns
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 let (lorem, ipsum, _, _) = (1, 2, 3, 4);
@@ -296,36 +565,6 @@ let (lorem, ipsum, _, _) = (1, 2, 3, 4);
 let (lorem, ipsum, ..) = (1, 2, 3, 4);
 ```
 
-## `control_style`
-
-Indent style for control flow statements
-
-- **Default value**: `"Rfc"`
-- **Possible values**: `"Rfc"`, `"Legacy"`
-
-#### `"Rfc"`:
-
-```rust
-if lorem_ipsum &&
-    dolor_sit &&
-    amet_consectetur
-{
-    // ...
-}
-```
-
-#### `"Legacy"`:
-
-```rust
-if lorem_ipsum &&
-   dolor_sit &&
-   amet_consectetur {
-    // ...
-}
-```
-
-See also: [`control_brace_style`](#control_brace_style).
-
 ## `control_brace_style`
 
 Brace style for control flow constructs
@@ -333,25 +572,25 @@ Brace style for control flow constructs
 - **Default value**: `"AlwaysSameLine"`
 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
 
-#### `"AlwaysNextLine"`:
+#### `"AlwaysSameLine"` (default):
 
 ```rust
-if lorem
-{
+if lorem {
     println!("ipsum!");
-}
-else
-{
+} else {
     println!("dolor!");
 }
 ```
 
-#### `"AlwaysSameLine"`:
+#### `"AlwaysNextLine"`:
 
 ```rust
-if lorem {
+if lorem
+{
     println!("ipsum!");
-} else {
+}
+else
+{
     println!("dolor!");
 }
 ```
@@ -376,41 +615,30 @@ Don't reformat anything
 
 ## `error_on_line_overflow`
 
-Error if unable to get all lines within max_width
+Error if unable to get all lines within `max_width`
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
 
 See also [`max_width`](#max_width).
 
-## `fn_args_density`
-
-Argument density in functions
+## `error_on_line_overflow_comments`
 
-- **Default value**: `"Tall"`
-- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
+Error if unable to get all comment lines within `comment_width`.
 
-#### `"Compressed"`:
+- **Default value**: `true`
+- **Possible values**: `true`, `false`
 
-```rust
-trait Lorem {
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
+See also [`comment_width`](#comment_width).
 
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
-        // body
-    }
+## `fn_args_density`
 
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
-             adipiscing: Adipiscing, elit: Elit);
+Argument density in functions
 
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
-             adipiscing: Adipiscing, elit: Elit) {
-        // body
-    }
-}
-```
+- **Default value**: `"Tall"`
+- **Possible values**: `"Compressed"`, `"Tall"`, `"Vertical"`
 
-#### `"CompressedIfEmpty"`:
+#### `"Tall"` (default):
 
 ```rust
 trait Lorem {
@@ -420,22 +648,31 @@ trait Lorem {
         // body
     }
 
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
-             adipiscing: Adipiscing, elit: Elit);
-
-    fn lorem(ipsum: Ipsum,
-             dolor: Dolor,
-             sit: Sit,
-             amet: Amet,
-             consectetur: onsectetur,
-             adipiscing: Adipiscing,
-             elit: Elit) {
+    fn lorem(
+        ipsum: Ipsum,
+        dolor: Dolor,
+        sit: Sit,
+        amet: Amet,
+        consectetur: Consectetur,
+        adipiscing: Adipiscing,
+        elit: Elit,
+    );
+
+    fn lorem(
+        ipsum: Ipsum,
+        dolor: Dolor,
+        sit: Sit,
+        amet: Amet,
+        consectetur: Consectetur,
+        adipiscing: Adipiscing,
+        elit: Elit,
+    ) {
         // body
     }
 }
 ```
 
-#### `"Tall"`:
+#### `"Compressed"`:
 
 ```rust
 trait Lorem {
@@ -445,21 +682,15 @@ trait Lorem {
         // body
     }
 
-    fn lorem(ipsum: Ipsum,
-             dolor: Dolor,
-             sit: Sit,
-             amet: Amet,
-             consectetur: onsectetur,
-             adipiscing: Adipiscing,
-             elit: Elit);
+    fn lorem(
+        ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
+        adipiscing: Adipiscing, elit: Elit,
+    );
 
-    fn lorem(ipsum: Ipsum,
-             dolor: Dolor,
-             sit: Sit,
-             amet: Amet,
-             consectetur: onsectetur,
-             adipiscing: Adipiscing,
-             elit: Elit) {
+    fn lorem(
+        ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
+        adipiscing: Adipiscing, elit: Elit,
+    ) {
         // body
     }
 }
@@ -485,7 +716,7 @@ trait Lorem {
              dolor: Dolor,
              sit: Sit,
              amet: Amet,
-             consectetur: onsectetur,
+             consectetur: Consectetur,
              adipiscing: Adipiscing,
              elit: Elit);
 
@@ -493,7 +724,7 @@ trait Lorem {
              dolor: Dolor,
              sit: Sit,
              amet: Amet,
-             consectetur: onsectetur,
+             consectetur: Consectetur,
              adipiscing: Adipiscing,
              elit: Elit) {
         // body
@@ -501,91 +732,35 @@ trait Lorem {
 }
 ```
 
-## `fn_args_layout`
-
-Layout of function arguments and tuple structs
-
-- **Default value**: `"Block"`
-- **Possible values**: `"Block"`, `"Visual"`
 
-#### `"Block"`:
+## `brace_style`
 
-```rust
-fn lorem() {}
+Brace style for items
 
-fn lorem(ipsum: usize) {}
+- **Default value**: `"SameLineWhere"`
+- **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
 
-fn lorem(
-    ipsum: usize,
-    dolor: usize,
-    sit: usize,
-    amet: usize,
-    consectetur: usize,
-    adipiscing: usize,
-    elit: usize,
-) {
-    // body
-}
-```
+### Functions
 
-#### `"Visual"`:
+#### `"SameLineWhere"` (default):
 
 ```rust
-fn lorem() {}
-
-fn lorem(ipsum: usize) {}
-
-fn lorem(ipsum: usize,
-         dolor: usize,
-         sit: usize,
-         amet: usize,
-         consectetur: usize,
-         adipiscing: usize,
-         elit: usize) {
+fn lorem() {
     // body
 }
-```
-
-## `fn_args_paren_newline`
-
-If function argument parenthesis goes on a newline
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-#### `false`:
 
-```rust
-fn lorem(
-    ipsum: Ipsum,
-    dolor: Dolor,
-    sit: Sit,
-    amet: Amet)
-    -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
+fn lorem(ipsum: usize) {
     // body
 }
-```
 
-#### `true`:
-
-```rust
-fn lorem
-    (ipsum: Ipsum,
-     dolor: Dolor,
-     sit: Sit,
-     amet: Amet)
-     -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
+fn lorem<T>(ipsum: T)
+where
+    T: Add + Sub + Mul + Div,
+{
     // body
 }
 ```
 
-## `fn_brace_style`
-
-Brace style for functions
-
-- **Default value**: `"SameLineWhere"`
-- **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
-
 #### `"AlwaysNextLine"`:
 
 ```rust
@@ -600,30 +775,14 @@ fn lorem(ipsum: usize)
 }
 
 fn lorem<T>(ipsum: T)
-    where T: Add + Sub + Mul + Div
-{
-    // body
-}
-```
-
-#### `"PreferSameLine"`:
-
-```rust
-fn lorem() {
-    // body
-}
-
-fn lorem(ipsum: usize) {
-    // body
-}
-
-fn lorem<T>(ipsum: T)
-    where T: Add + Sub + Mul + Div {
+where
+    T: Add + Sub + Mul + Div,
+{
     // body
 }
 ```
 
-#### `"SameLineWhere"`:
+#### `"PreferSameLine"`:
 
 ```rust
 fn lorem() {
@@ -635,127 +794,84 @@ fn lorem(ipsum: usize) {
 }
 
 fn lorem<T>(ipsum: T)
-    where T: Add + Sub + Mul + Div
-{
+where
+    T: Add + Sub + Mul + Div, {
     // body
 }
 ```
 
-## `fn_call_style`
-
-Indentation for function calls, etc.
-
-- **Default value**: `"Block"`
-- **Possible values**: `"Block"`, `"Visual"`
+### Structs and enums
 
-#### `"Block"`:
+#### `"SameLineWhere"` (default):
 
 ```rust
-lorem(
-    "lorem",
-    "ipsum",
-    "dolor",
-    "sit",
-    "amet",
-    "consectetur",
-    "adipiscing",
-    "elit",
-);
-```
-
-#### `"Visual"`:
+struct Lorem {
+    ipsum: bool,
+}
 
-```rust
-lorem("lorem",
-      "ipsum",
-      "dolor",
-      "sit",
-      "amet",
-      "consectetur",
-      "adipiscing",
-      "elit");
+struct Dolor<T>
+    where T: Eq
+{
+    sit: T,
+}
 ```
 
-## `fn_call_width`
+#### `"AlwaysNextLine"`:
 
-Maximum width of the args of a function call before falling back to vertical formatting
+```rust
+struct Lorem
+{
+    ipsum: bool,
+}
 
-- **Default value**: `60`
-- **Possible values**: any positive integer
+struct Dolor<T>
+    where T: Eq
+{
+    sit: T,
+}
+```
 
-**Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
+#### `"PreferSameLine"`:
 
-#### Function call shorter than `fn_call_width`:
 ```rust
-lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
-```
+struct Lorem {
+    ipsum: bool,
+}
 
-#### Function call longer than `fn_call_width`:
+struct Dolor<T>
+    where T: Eq {
+    sit: T,
+}
+```
 
-See [`fn_call_style`](#fn_call_style).
 
-## `fn_empty_single_line`
+## `empty_item_single_line`
 
-Put empty-body functions on a single line
+Put empty-body functions and impls on a single line
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
 
-#### `false`:
-
-```rust
-fn lorem() {
-}
-```
-
-#### `true`:
+#### `true` (default):
 
 ```rust
 fn lorem() {}
-```
 
-See also [`control_brace_style`](#control_brace_style).
-
-## `fn_return_indent`
-
-Location of return type in function declaration
-
-- **Default value**: `"WithArgs"`
-- **Possible values**: `"WithArgs"`, `"WithWhereClause"`
+impl Lorem {}
+```
 
-#### `"WithArgs"`:
+#### `false`:
 
 ```rust
-fn lorem(ipsum: Ipsum,
-         dolor: Dolor,
-         sit: Sit,
-         amet: Amet,
-         consectetur: Consectetur,
-         adipiscing: Adipiscing)
-         -> Elit
-    where Ipsum: Eq
-{
-    // body
+fn lorem() {
 }
 
+impl Lorem {
+}
 ```
 
-#### `"WithWhereClause"`:
-
-```rust
-fn lorem(ipsum: Ipsum,
-         dolor: Dolor,
-         sit: Sit,
-         amet: Amet,
-         consectetur: Consectetur,
-         adipiscing: Adipiscing)
-    -> Elit
-    where Ipsum: Eq
-{
-    // body
-}
+See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_style).
 
-```
 
 ## `fn_single_line`
 
@@ -764,7 +880,7 @@ Put single-expression functions on a single line
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 fn lorem() -> usize {
@@ -799,33 +915,22 @@ Always print the abi for extern items
 
 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
 
-#### `false`:
+#### `true` (default):
 
 ```rust
-extern {
+extern "C" {
     pub static lorem: c_int;
 }
 ```
 
-#### `true`:
+#### `false`:
 
 ```rust
-extern "C" {
+extern {
     pub static lorem: c_int;
 }
 ```
 
-## `force_format_strings`
-
-Always format string literals
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-See [`format_strings`](#format_strings).
-
-See also [`max_width`](#max_width).
-
 ## `format_strings`
 
 Format string literals where necessary
@@ -833,7 +938,7 @@ Format string literals where necessary
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit";
@@ -847,59 +952,7 @@ let lorem =
      adipiscing elit lorem ipsum dolor sit";
 ```
 
-See also [`force_format_strings`](#force_format_strings), [`max_width`](#max_width).
-
-## `generics_indent`
-
-Indentation of generics
-
-- **Default value**: `"Block"`
-- **Possible values**: `"Block"`, `"Visual"`
-
-#### `"Block"`:
-
-```rust
-fn lorem<
-    Ipsum: Eq = usize,
-    Dolor: Eq = usize,
-    Sit: Eq = usize,
-    Amet: Eq = usize,
-    Adipiscing: Eq = usize,
-    Consectetur: Eq = usize,
-    Elit: Eq = usize
->(ipsum: Ipsum,
-    dolor: Dolor,
-    sit: Sit,
-    amet: Amet,
-    adipiscing: Adipiscing,
-    consectetur: Consectetur,
-    elit: Elit)
-    -> T {
-    // body
-}
-```
-
-#### `"Visual"`:
-
-```rust
-fn lorem<Ipsum: Eq = usize,
-         Dolor: Eq = usize,
-         Sit: Eq = usize,
-         Amet: Eq = usize,
-         Adipiscing: Eq = usize,
-         Consectetur: Eq = usize,
-         Elit: Eq = usize>
-    (ipsum: Ipsum,
-     dolor: Dolor,
-     sit: Sit,
-     amet: Amet,
-     adipiscing: Adipiscing,
-     consectetur: Consectetur,
-     elit: Elit)
-     -> T {
-    // body
-}
-```
+See also [`max_width`](#max_width).
 
 ## `hard_tabs`
 
@@ -908,7 +961,7 @@ Use tab characters for indentation, spaces for alignment
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 fn lorem() -> usize {
@@ -926,58 +979,6 @@ fn lorem() -> usize {
 
 See also: [`tab_spaces`](#tab_spaces).
 
-## `impl_empty_single_line`
-
-Put empty-body implementations on a single line
-
-- **Default value**: `true`
-- **Possible values**: `true`, `false`
-
-#### `false`:
-
-```rust
-impl Lorem {
-}
-```
-
-#### `true`:
-
-```rust
-impl Lorem {}
-```
-
-See also [`item_brace_style`](#item_brace_style).
-
-## `indent_match_arms`
-
-Indent match arms instead of keeping them at the same indentation level as the match keyword
-
-- **Default value**: `true`
-- **Possible values**: `true`, `false`
-
-#### `false`:
-
-```rust
-match lorem {
-Lorem::Ipsum => (),
-Lorem::Dolor => (),
-Lorem::Sit => (),
-Lorem::Amet => (),
-}
-```
-
-#### `true`:
-
-```rust
-match lorem {
-    Lorem::Ipsum => (),
-    Lorem::Dolor => (),
-    Lorem::Sit => (),
-    Lorem::Amet => (),
-}
-```
-
-See also: [`match_block_trailing_comma`](#match_block_trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
 
 ## `imports_indent`
 
@@ -986,7 +987,15 @@ Indent style of imports
 - **Default Value**: `"Visual"`
 - **Possible values**: `"Block"`, `"Visual"`
 
-#### `"Block"`
+#### `"Visual"` (default):
+
+```rust
+use foo::{xxx,
+          yyy,
+          zzz};
+```
+
+#### `"Block"`:
 
 ```rust
 use foo::{
@@ -996,14 +1005,6 @@ use foo::{
 };
 ```
 
-#### `"Visual"`
-
-```rust
-use foo::{xxx,
-          yyy,
-          zzz};
-```
-
 See also: [`imports_layout`](#imports_layout).
 
 ## `imports_layout`
@@ -1013,7 +1014,7 @@ Item layout inside a imports block
 - **Default value**: "Mixed"
 - **Possible values**: "Horizontal", "HorizontalVertical", "Mixed", "Vertical"
 
-#### `"Mixed"`
+#### `"Mixed"` (default):
 
 ```rust
 use foo::{xxx, yyy, zzz};
@@ -1022,93 +1023,45 @@ use foo::{aaa, bbb, ccc,
           ddd, eee, fff};
 ```
 
-#### `"Horizontal"`
+#### `"Horizontal"`:
 
 **Note**: This option forces to put everything on one line and may exceeds `max_width`.
 
 ```rust
 use foo::{xxx, yyy, zzz};
-
-use foo::{aaa, bbb, ccc, ddd, eee, fff};
-```
-
-#### `"HorizontalVertical"`
-
-```rust
-use foo::{xxx, yyy, zzz};
-
-use foo::{aaa,
-          bbb,
-          ccc,
-          ddd, 
-          eee, 
-          fff};
-```
-
-#### `"Vertical"`
-
-```rust
-use foo::{xxx,
-          yyy,
-          zzz};
-
-use foo::{aaa,
-          bbb,
-          ccc,
-          ddd,
-          eee,
-          fff};
-```
-
-## `item_brace_style`
-
-Brace style for structs and enums
-
-- **Default value**: `"SameLineWhere"`
-- **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
-
-#### `"AlwaysNextLine"`:
-
-```rust
-struct Lorem
-{
-    ipsum: bool,
-}
-
-struct Dolor<T>
-    where T: Eq
-{
-    sit: T,
-}
+
+use foo::{aaa, bbb, ccc, ddd, eee, fff};
 ```
 
-#### `"PreferSameLine"`:
+#### `"HorizontalVertical"`:
 
 ```rust
-struct Lorem {
-    ipsum: bool,
-}
+use foo::{xxx, yyy, zzz};
 
-struct Dolor<T>
-    where T: Eq {
-    sit: T,
-}
+use foo::{aaa,
+          bbb,
+          ccc,
+          ddd,
+          eee,
+          fff};
 ```
 
-#### `"SameLineWhere"`:
+#### `"Vertical"`:
 
 ```rust
-struct Lorem {
-    ipsum: bool,
-}
+use foo::{xxx,
+          yyy,
+          zzz};
 
-struct Dolor<T>
-    where T: Eq
-{
-    sit: T,
-}
+use foo::{aaa,
+          bbb,
+          ccc,
+          ddd,
+          eee,
+          fff};
 ```
 
+
 ## `match_block_trailing_comma`
 
 Put a trailing comma after a block based match arm (non-block arms are not affected)
@@ -1116,7 +1069,7 @@ Put a trailing comma after a block based match arm (non-block arms are not affec
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 match lorem {
@@ -1138,7 +1091,7 @@ match lorem {
 }
 ```
 
-See also: [`indent_match_arms`](#indent_match_arms), [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
+See also: [`trailing_comma`](#trailing_comma), [`match_arm_blocks`](#match_arm_blocks).
 
 ## `max_width`
 
@@ -1149,6 +1102,74 @@ Maximum width of each line
 
 See also [`error_on_line_overflow`](#error_on_line_overflow).
 
+## `merge_derives`
+
+Merge multiple derives into a single one.
+
+- **Default value**: `true`
+- **Possible values**: `true`, `false`
+
+#### `true` (default):
+
+```rust
+#[derive(Eq, PartialEq, Debug, Copy, Clone)]
+pub enum Foo {}
+```
+
+#### `false`:
+
+```rust
+#[derive(Eq, PartialEq)]
+#[derive(Debug)]
+#[derive(Copy, Clone)]
+pub enum Foo {}
+```
+
+## `force_multiline_blocks`
+
+Force multiline closure and match arm bodies to be wrapped in a block
+
+- **Default value**: `false`
+- **Possible values**: `false`, `true`
+
+#### `false` (default):
+
+```rust
+result.and_then(|maybe_value| match maybe_value {
+    None => ...,
+    Some(value) => ...,
+})
+
+match lorem {
+    None => if ipsum {
+        println!("Hello World");
+    },
+    Some(dolor) => ...,
+}
+```
+
+#### `true`:
+
+```rust
+
+result.and_then(|maybe_value| {
+    match maybe_value {
+        None => ...,
+        Some(value) => ...,
+    }
+})
+
+match lorem {
+    None => {
+        if ipsum {
+            println!("Hello World");
+        }
+    }
+    Some(dolor) => ...,
+}
+```
+
+
 ## `newline_style`
 
 Unix or Windows line endings
@@ -1163,7 +1184,7 @@ Convert /* */ comments to // comments where possible
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 // Lorem ipsum:
@@ -1190,7 +1211,7 @@ Reorder lists of names in import statements alphabetically
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 use super::{lorem, ipsum, dolor, sit};
@@ -1211,7 +1232,7 @@ Reorder import statements alphabetically
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 use lorem;
@@ -1240,7 +1261,7 @@ Reorder import statements in group
 
 **Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 use std::mem;
@@ -1266,218 +1287,192 @@ use sit;
 
 See also [`reorder_imports`](#reorder_imports).
 
-## `single_line_if_else_max_width`
+## `reorder_extern_crates`
 
-Maximum line length for single line if-else expressions.
+Reorder `extern crate` statements alphabetically
 
-- **Default value**: `50`
-- **Possible values**: any positive integer
+- **Default value**: `true`
+- **Possible values**: `true`, `false`
 
-**Note:** A value of `0` results in if-else expressions being broken regardless of their line's width.
+#### `true` (default):
 
-#### Lines shorter than `single_line_if_else_max_width`:
 ```rust
-let lorem = if ipsum { dolor } else { sit };
+extern crate dolor;
+extern crate ipsum;
+extern crate lorem;
+extern crate sit;
 ```
 
-#### Lines longer than `single_line_if_else_max_width`:
+#### `false`:
+
 ```rust
-let lorem = if ipsum {
-    dolor
-} else {
-    sit
-};
+extern crate lorem;
+extern crate ipsum;
+extern crate dolor;
+extern crate sit;
 ```
 
-See also: [`control_brace_style`](#control_brace_style).
-
-## `skip_children`
-
-Don't reformat out of line modules
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
+See also [`reorder_extern_crates_in_group`](#reorder_extern_crates_in_group).
 
-## `space_after_bound_colon`
+## `reorder_extern_crates_in_group`
 
-Leave a space after the colon in a trait or lifetime bound
+Reorder `extern crate` statements in group
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+**Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
+
+#### `true` (default):
 
 ```rust
-fn lorem<T:Eq>(t: T) {
-    // body
-}
+extern crate a;
+extern crate b;
+
+extern crate dolor;
+extern crate ipsum;
+extern crate lorem;
+extern crate sit;
 ```
 
-#### `true`:
+#### `false`:
 
 ```rust
-fn lorem<T: Eq>(t: T) {
-    // body
-}
-```
+extern crate b;
+extern crate a;
 
-See also: [`space_before_bound`](#space_before_bound).
+extern crate lorem;
+extern crate ipsum;
+extern crate dolor;
+extern crate sit;
+```
 
-## `struct_field_align_threshold`
+See also [`reorder_extern_crates`](#reorder_extern_crates).
 
-The maximum diff of width between struct fields to be aligned with each other.
+## `report_todo`
 
-- **Default value** : 0
-- **Possible values**: any positive integer
+Report `TODO` items in comments.
 
-#### `0`:
+- **Default value**: `"Never"`
+- **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"`
 
-```rust
-struct Foo {
-    x: u32,
-    yy: u32,
-    zzz: u32,
-}
-```
+Warns about any comments containing `TODO` in them when set to `"Always"`. If
+it contains a `#X` (with `X` being a number) in parentheses following the
+`TODO`, `"Unnumbered"` will ignore it.
 
-#### `20`:
+See also [`report_fixme`](#report_fixme).
 
-```rust
-struct Foo {
-    x:   u32,
-    yy:  u32,
-    zzz: u32,
-}
-```
+## `report_fixme`
 
-## `space_after_struct_lit_field_colon`
+Report `FIXME` items in comments.
 
-Leave a space after the colon in a struct literal field
+- **Default value**: `"Never"`
+- **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"`
 
-- **Default value**: `true`
-- **Possible values**: `true`, `false`
+Warns about any comments containing `FIXME` in them when set to `"Always"`. If
+it contains a `#X` (with `X` being a number) in parentheses following the
+`FIXME`, `"Unnumbered"` will ignore it.
 
-#### `false`:
+See also [`report_todo`](#report_todo).
 
-```rust
-let lorem = Lorem {
-    ipsum:dolor,
-    sit:amet,
-};
-```
 
-#### `true`:
+## `skip_children`
 
-```rust
-let lorem = Lorem {
-    ipsum: dolor,
-    sit: amet,
-};
-```
+Don't reformat out of line modules
 
-See also: [`space_before_struct_lit_field_colon`](#space_before_struct_lit_field_colon).
+- **Default value**: `false`
+- **Possible values**: `true`, `false`
 
-## `space_after_type_annotation_colon`
+## `space_after_colon`
 
-Leave a space after the colon in a type annotation
+Leave a space after the colon.
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `true` (default):
 
 ```rust
-fn lorem<T: Eq>(t:T) {
-    let ipsum:Dolor = sit;
+fn lorem<T: Eq>(t: T) {
+    let lorem: Dolor = Lorem {
+        ipsum: dolor,
+        sit: amet,
+    };
 }
 ```
 
-#### `true`:
+#### `false`:
 
 ```rust
-fn lorem<T: Eq>(t: T) {
-    let ipsum: Dolor = sit;
+fn lorem<T:Eq>(t:T) {
+    let lorem:Dolor = Lorem {
+        ipsum:dolor,
+        sit:amet,
+    };
 }
 ```
 
-See also: [`space_before_type_annotation`](#space_before_type_annotation).
+See also: [`space_before_colon`](#space_before_colon).
 
-## `space_before_bound`
+## `space_before_colon`
 
-Leave a space before the colon in a trait or lifetime bound
+Leave a space before the colon.
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 fn lorem<T: Eq>(t: T) {
-    let ipsum: Dolor = sit;
+    let lorem: Dolor = Lorem {
+        ipsum: dolor,
+        sit: amet,
+    };
 }
 ```
 
 #### `true`:
 
 ```rust
-fn lorem<T : Eq>(t: T) {
-    let ipsum: Dolor = sit;
+fn lorem<T : Eq>(t : T) {
+    let lorem : Dolor = Lorem {
+        ipsum : dolor,
+        sit : amet,
+    };
 }
 ```
 
-See also: [`space_after_bound_colon`](#space_after_bound_colon).
-
-## `space_before_struct_lit_field_colon`
-
-Leave a space before the colon in a struct literal field
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-#### `false`:
-
-```rust
-let lorem = Lorem {
-    ipsum: dolor,
-    sit: amet,
-};
-```
-
-#### `true`:
-
-```rust
-let lorem = Lorem {
-    ipsum : dolor,
-    sit : amet,
-};
-```
-
-See also: [`space_after_struct_lit_field_colon`](#space_after_struct_lit_field_colon).
+See also: [`space_after_colon`](#space_after_colon).
 
-## `space_before_type_annotation`
+## `struct_field_align_threshold`
 
-Leave a space before the colon in a type annotation
+The maximum diff of width between struct fields to be aligned with each other.
 
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
+- **Default value** : 0
+- **Possible values**: any positive integer
 
-#### `false`:
+#### `0` (default):
 
 ```rust
-fn lorem<T: Eq>(t: T) {
-    let ipsum: Dolor = sit;
+struct Foo {
+    x: u32,
+    yy: u32,
+    zzz: u32,
 }
 ```
 
-#### `true`:
+#### `20`:
 
 ```rust
-fn lorem<T: Eq>(t : T) {
-    let ipsum : Dolor = sit;
+struct Foo {
+    x:   u32,
+    yy:  u32,
+    zzz: u32,
 }
 ```
 
-See also: [`space_after_type_annotation_colon`](#space_after_type_annotation_colon).
+```
 
 ## `spaces_around_ranges`
 
@@ -1486,7 +1481,7 @@ Put spaces around the .. and ... range operators
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 let lorem = 0..10;
@@ -1498,14 +1493,14 @@ let lorem = 0..10;
 let lorem = 0 .. 10;
 ```
 
-## `spaces_within_angle_brackets`
+## `spaces_within_parens_and_brackets`
 
 Put spaces within non-empty generic arguments
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 fn lorem<T: Eq>(t: T) {
@@ -1521,16 +1516,16 @@ fn lorem< T: Eq >(t: T) {
 }
 ```
 
-See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
+See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
 
-## `spaces_within_parens`
+## `spaces_within_parens_and_brackets`
 
 Put spaces within non-empty parentheses
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 fn lorem<T: Eq>(t: T) {
@@ -1542,131 +1537,58 @@ fn lorem<T: Eq>(t: T) {
 
 ```rust
 fn lorem<T: Eq>( t: T ) {
-    let lorem = ( ipsum, dolor );
-}
-```
-
-See also: [`spaces_within_angle_brackets`](#spaces_within_angle_brackets), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
-
-## `spaces_within_square_brackets`
-
-Put spaces within non-empty square brackets
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-#### `false`:
-
-```rust
-let lorem: [usize; 2] = [ipsum, dolor];
-```
-
-#### `true`:
-
-```rust
-let lorem: [ usize; 2 ] = [ ipsum, dolor ];
-```
-
-See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_angle_brackets`](#spaces_within_angle_brackets).
-
-## `struct_lit_multiline_style`
-
-Multiline style on literal structs
-
-- **Default value**: `"PreferSingle"`
-- **Possible values**: `"ForceMulti"`, `"PreferSingle"`
-
-#### `"ForceMulti"`:
-
-```rust
-let lorem = Lorem {
-    ipsum: dolor,
-    sit: amet,
-};
-```
-
-#### `"PreferSingle"`:
-
-```rust
-let lorem = Lorem { ipsum: dolor, sit: amet };
-```
-
-See also: [`struct_lit_style`](#struct_lit_style), [`struct_lit_width`](#struct_lit_width).
-
-## `struct_lit_style`
-
-Style of struct definition
-
-- **Default value**: `"Block"`
-- **Possible values**: `"Block"`, `"Visual"`
-
-#### `"Block"`:
-
-```rust
-let lorem = Lorem {
-    ipsum: dolor,
-    sit: amet,
-};
-```
-
-#### `"Visual"`:
-
-```rust
-let lorem = Lorem { ipsum: dolor,
-                    sit: amet, };
+    let lorem = ( ipsum, dolor );
+}
 ```
 
-See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
+See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
 
-## `struct_lit_width`
+## `spaces_within_parens_and_brackets`
 
-Maximum width in the body of a struct lit before falling back to vertical formatting
+Put spaces within non-empty square brackets
 
-- **Default value**: `18`
-- **Possible values**: any positive integer
+- **Default value**: `false`
+- **Possible values**: `true`, `false`
 
-**Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
+#### `false` (default):
 
-#### Lines shorter than `struct_lit_width`:
 ```rust
-let lorem = Lorem { ipsum: dolor, sit: amet };
+let lorem: [usize; 2] = [ipsum, dolor];
 ```
 
-#### Lines longer than `struct_lit_width`:
-See [`struct_lit_style`](#struct_lit_style).
+#### `true`:
+
+```rust
+let lorem: [ usize; 2 ] = [ ipsum, dolor ];
+```
 
-See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
+See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
 
-## `struct_variant_width`
+## `struct_lit_single_line`
 
-Maximum width in the body of a struct variant before falling back to vertical formatting
+Put small struct literals on a single line
 
-- **Default value**: `35`
-- **Possible values**: any positive integer
+- **Default value**: `true`
+- **Possible values**: `true`, `false`
 
-**Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
+#### `true` (default):
 
-#### Struct variants shorter than `struct_variant_width`:
 ```rust
-enum Lorem {
-    Ipsum,
-    Dolor(bool),
-    Sit { amet: Consectetur, adipiscing: Elit },
-}
+let lorem = Lorem { ipsum: dolor, sit: amet };
 ```
 
-#### Struct variants longer than `struct_variant_width`:
+#### `false`:
+
 ```rust
-enum Lorem {
-    Ipsum,
-    Dolor(bool),
-    Sit {
-        amet: Consectetur,
-        adipiscing: Elit,
-    },
-}
+let lorem = Lorem {
+    ipsum: dolor,
+    sit: amet,
+};
 ```
 
+See also: [`indent_style`](#indent_style).
+
+
 ## `tab_spaces`
 
 Number of spaces per tab
@@ -1674,18 +1596,7 @@ Number of spaces per tab
 - **Default value**: `4`
 - **Possible values**: any positive integer
 
-#### `2`:
-
-```rust
-fn lorem() {
-  let ipsum = dolor();
-  let sit = vec![
-    "amet consectetur adipiscing elit."
-  ];
-}
-```
-
-#### `4`:
+#### `4` (default):
 
 ```rust
 fn lorem() {
@@ -1696,37 +1607,19 @@ fn lorem() {
 }
 ```
 
-See also: [`hard_tabs`](#hard_tabs).
-
-## `take_source_hints`
-
-Retain some formatting characteristics from the source code
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-#### `false`:
+#### `2`:
 
 ```rust
-lorem
-    .ipsum()
-    .dolor(|| { sit.amet().consectetur().adipiscing().elit(); });
+fn lorem() {
+  let ipsum = dolor();
+  let sit = vec![
+    "amet consectetur adipiscing elit."
+  ];
+}
 ```
 
-#### `true`:
-
-```rust
-lorem
-    .ipsum()
-    .dolor(|| {
-               sit.amet()
-                   .consectetur()
-                   .adipiscing()
-                   .elit();
-           });
-```
+See also: [`hard_tabs`](#hard_tabs).
 
-Note: This only applies if the call chain within the inner closure had already been formatted on separate lines before running rustfmt.
 
 ## `trailing_comma`
 
@@ -1735,10 +1628,10 @@ How to handle trailing commas for lists
 - **Default value**: `"Vertical"`
 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
 
-#### `"Always"`:
+#### `"Vertical"` (default):
 
 ```rust
-let Lorem { ipsum, dolor, sit, } = amet;
+let Lorem { ipsum, dolor, sit } = amet;
 let Lorem {
     ipsum,
     dolor,
@@ -1749,21 +1642,21 @@ let Lorem {
 } = elit;
 ```
 
-#### `"Never"`:
+#### `"Always"`:
 
 ```rust
-let Lorem { ipsum, dolor, sit } = amet;
+let Lorem { ipsum, dolor, sit, } = amet;
 let Lorem {
     ipsum,
     dolor,
     sit,
     amet,
     consectetur,
-    adipiscing
+    adipiscing,
 } = elit;
 ```
 
-#### `"Vertical"`:
+#### `"Never"`:
 
 ```rust
 let Lorem { ipsum, dolor, sit } = amet;
@@ -1773,7 +1666,7 @@ let Lorem {
     sit,
     amet,
     consectetur,
-    adipiscing,
+    adipiscing
 } = elit;
 ```
 
@@ -1786,7 +1679,7 @@ Add trailing semicolon after break, continue and return
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
 
-#### `true`:
+#### `true` (default):
 ```rust
 fn foo() -> usize {
     return 0;
@@ -1807,18 +1700,18 @@ Determines if `+` or `=` are wrapped in spaces in the punctuation of types
 - **Default value**: `"Wide"`
 - **Possible values**: `"Compressed"`, `"Wide"`
 
-#### `"Compressed"`:
+#### `"Wide"` (default):
 
 ```rust
-fn lorem<Ipsum: Dolor+Sit=Amet>() {
+fn lorem<Ipsum: Dolor + Sit = Amet>() {
        // body
 }
 ```
 
-#### `"Wide"`:
+#### `"Compressed"`:
 
 ```rust
-fn lorem<Ipsum: Dolor + Sit = Amet>() {
+fn lorem<Ipsum: Dolor+Sit=Amet>() {
        // body
 }
 ```
@@ -1830,7 +1723,7 @@ Replace uses of the try! macro by the ? shorthand
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 let lorem = try!(ipsum.map(|dolor|dolor.sit()));
@@ -1842,226 +1735,6 @@ let lorem = try!(ipsum.map(|dolor|dolor.sit()));
 let lorem = ipsum.map(|dolor| dolor.sit())?;
 ```
 
-## `where_density`
-
-Density of a where clause
-
-- **Default value**: `"CompressedIfEmpty"`
-- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
-
-#### `"Compressed"`:
-
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
-        // body
-    }
-}
-```
-
-#### `"CompressedIfEmpty"`:
-
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-        where Dolor: Eq
-    {
-        // body
-    }
-}
-```
-
-#### `"Tall"`:
-
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-        where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-        where Dolor: Eq
-    {
-        // body
-    }
-}
-```
-
-**Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
-
-#### `"Vertical"`:
-
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-        where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-        where Dolor: Eq
-    {
-        // body
-    }
-}
-```
-
-**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
-
-See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
-
-## `where_layout`
-
-Element layout inside a where clause
-
-- **Default value**: `"Vertical"`
-- **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
-
-#### `"Horizontal"`:
-
-```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
-{
-    // body
-}
-```
-
-#### `"HorizontalVertical"`:
-
-```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing,
-          Amet: AmetConsecteturAdipiscingElit
-{
-    // body
-}
-```
-
-#### `"Mixed"`:
-
-```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
-{
-    // body
-}
-```
-
-#### `"Vertical"`:
-
-```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing,
-          Amet: AmetConsecteturAdipiscingElit
-{
-    // body
-}
-```
-
-See also: [`where_density`](#where_density), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
-
-## `where_pred_indent`
-
-Indentation style of a where predicate
-
-- **Default value**: `"Visual"`
-- **Possible values**: `"Block"`, `"Visual"`
-
-#### `"Block"`:
-
-```rust
-fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
-    where Ipsum: Eq,
-        Dolor: Eq,
-        Sit: Eq,
-        Amet: Eq
-{
-    // body
-}
-```
-
-#### `"Visual"`:
-
-```rust
-fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
-    where Ipsum: Eq,
-          Dolor: Eq,
-          Sit: Eq,
-          Amet: Eq
-{
-    // body
-}
-```
-
-See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_style`](#where_style).
-
-## `where_style`
-
-Overall strategy for where clauses
-
-- **Default value**: `"Rfc"`
-- **Possible values**: `"Rfc"`, `"Legacy"`
-
-#### `"Rfc"`:
-
-```rust
-fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
-where
-    Ipsum: Eq,
-    Dolor: Eq,
-    Sit: Eq,
-    Amet: Eq,
-{
-    // body
-}
-```
-
-#### `"Legacy"`:
-
-```rust
-fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
-    where Ipsum: Eq,
-          Dolor: Eq,
-          Sit: Eq,
-          Amet: Eq
-{
-    // body
-}
-```
-
-See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent).
 
 ## `wrap_comments`
 
@@ -2070,7 +1743,7 @@ Break comments to fit on the line
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `false` (default):
 
 ```rust
 // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
@@ -2086,35 +1759,35 @@ Break comments to fit on the line
 // commodo consequat.
 ```
 
-## `wrap_match_arms`
+## `match_arm_blocks`
 
 Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
 
-#### `false`:
+#### `true` (default):
 
 ```rust
 match lorem {
-    true =>
-        foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
+    true => {
+        foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
+    }
     false => println!("{}", sit),
 }
 ```
 
-#### `true`:
+#### `false`:
 
 ```rust
 match lorem {
-    true => {
-        foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
-    }
+    true =>
+        foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
     false => println!("{}", sit),
 }
 ```
 
-See also: [`indent_match_arms`](#indent_match_arms), [`match_block_trailing_comma`](#match_block_trailing_comma).
+See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
 
 ## `write_mode`