]> git.lizzy.rs Git - rust.git/blobdiff - Configurations.md
Merge pull request #2734 from andjo403/isatty
[rust.git] / Configurations.md
index 275d4883760d7d5b003b673d53ba879414f1cb98..6c4e7dc77604d8802dfdde3263278d0dc70bafb8 100644 (file)
@@ -6,49 +6,17 @@ A possible content of `rustfmt.toml` or `.rustfmt.toml` might look like this:
 
 ```toml
 indent_style = "Block"
-array_width = 80
-reorder_imported_names = true
+reorder_imports = false
 ```
 
+Each configuration option is either stable or unstable.
+Stable options can be used directly, while unstable options are opt-in.
+To enable unstable options, set `unstable_features = true` in `rustfmt.toml` or pass `--unstable-features` to rustfmt.
+
 # Configuration Options
 
 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.
-
-- **Default value**: `0`
-- **Possible values**: any positive integer
-
-**Note:** A value of `0` results in [`indent_style`](#indent_style) being applied regardless of a line's width.
-
-#### `0` (default):
-
-```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,
-];
-```
 
 ## `indent_style`
 
@@ -56,33 +24,38 @@ Indent on expressions or items.
 
 - **Default value**: `"Block"`
 - **Possible values**: `"Block"`, `"Visual"`
+- **Stable**: No
 
 ### Array
 
 #### `"Block"` (default):
 
 ```rust
-let lorem = vec![
-    "ipsum",
-    "dolor",
-    "sit",
-    "amet",
-    "consectetur",
-    "adipiscing",
-    "elit",
-];
+fn main() {
+    let lorem = vec![
+        "ipsum",
+        "dolor",
+        "sit",
+        "amet",
+        "consectetur",
+        "adipiscing",
+        "elit",
+    ];
+}
 ```
 
 #### `"Visual"`:
 
 ```rust
-let lorem = vec!["ipsum",
-                 "dolor",
-                 "sit",
-                 "amet",
-                 "consectetur",
-                 "adipiscing",
-                 "elit"];
+fn main() {
+    let lorem = vec!["ipsum",
+                     "dolor",
+                     "sit",
+                     "amet",
+                     "consectetur",
+                     "adipiscing",
+                     "elit"];
+}
 ```
 
 ### Control flow
@@ -90,21 +63,34 @@ let lorem = vec!["ipsum",
 #### `"Block"` (default):
 
 ```rust
-if lorem_ipsum &&
-    dolor_sit &&
-    amet_consectetur
-{
-    // ...
+fn main() {
+    if lorem_ipsum
+        && dolor_sit
+        && amet_consectetur
+        && lorem_sit
+        && dolor_consectetur
+        && amet_ipsum
+        && lorem_consectetur
+    {
+        // ...
+    }
 }
 ```
 
 #### `"Visual"`:
 
 ```rust
-if lorem_ipsum &&
-   dolor_sit &&
-   amet_consectetur {
-    // ...
+fn main() {
+    if lorem_ipsum
+       && dolor_sit
+       && amet_consectetur
+       && lorem_sit
+       && dolor_consectetur
+       && amet_ipsum
+       && lorem_consectetur
+    {
+        // ...
+    }
 }
 ```
 
@@ -155,29 +141,33 @@ fn lorem(ipsum: usize,
 #### `"Block"` (default):
 
 ```rust
-lorem(
-    "lorem",
-    "ipsum",
-    "dolor",
-    "sit",
-    "amet",
-    "consectetur",
-    "adipiscing",
-    "elit",
-);
+fn main() {
+    lorem(
+        "lorem",
+        "ipsum",
+        "dolor",
+        "sit",
+        "amet",
+        "consectetur",
+        "adipiscing",
+        "elit",
+    );
+}
 ```
 
 #### `"Visual"`:
 
 ```rust
-lorem("lorem",
-      "ipsum",
-      "dolor",
-      "sit",
-      "amet",
-      "consectetur",
-      "adipiscing",
-      "elit");
+fn main() {
+    lorem("lorem",
+          "ipsum",
+          "dolor",
+          "sit",
+          "amet",
+          "consectetur",
+          "adipiscing",
+          "elit");
+}
 ```
 
 ### Generics
@@ -192,7 +182,7 @@ fn lorem<
     Amet: Eq = usize,
     Adipiscing: Eq = usize,
     Consectetur: Eq = usize,
-    Elit: Eq = usize
+    Elit: Eq = usize,
 >(
     ipsum: Ipsum,
     dolor: Dolor,
@@ -215,15 +205,15 @@ fn lorem<Ipsum: 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 {
+         Elit: Eq = usize>(
+    ipsum: Ipsum,
+    dolor: Dolor,
+    sit: Sit,
+    amet: Amet,
+    adipiscing: Adipiscing,
+    consectetur: Consectetur,
+    elit: Elit)
+    -> T {
     // body
 }
 ```
@@ -233,17 +223,21 @@ fn lorem<Ipsum: Eq = usize,
 #### `"Block"` (default):
 
 ```rust
-let lorem = Lorem {
-    ipsum: dolor,
-    sit: amet,
-};
+fn main() {
+    let lorem = Lorem {
+        ipsum: dolor,
+        sit: amet,
+    };
+}
 ```
 
 #### `"Visual"`:
 
 ```rust
-let lorem = Lorem { ipsum: dolor,
-                    sit: amet, };
+fn main() {
+    let lorem = Lorem { ipsum: dolor,
+                        sit: amet, };
+}
 ```
 
 See also: [`struct_lit_single_line`](#struct_lit_single_line), [`indent_style`](#indent_style).
@@ -254,11 +248,11 @@ See also: [`struct_lit_single_line`](#struct_lit_single_line), [`indent_style`](
 
 ```rust
 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
-where 
+where
     Ipsum: Eq,
     Dolor: Eq,
     Sit: Eq,
-    Amet: Eq
+    Amet: Eq,
 {
     // body
 }
@@ -277,70 +271,71 @@ fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
 }
 ```
 
-See also: [`where_density`](#where_density), [`where_layout`](#where_layout).
-
-## `array_width`
-
-Maximum width of an array literal before falling back to vertical formatting
-
-- **Default value**: `60`
-- **Possible values**: any positive integer
-
-**Note:** A value of `0` results in [`indent_style`](#indent_style) being applied regardless of a line's width.
-
-#### Lines shorter than `array_width`:
-```rust
-let lorem = vec!["ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"];
-```
-
-#### Lines longer than `array_width`:
-See [`indent_style`](#indent_style).
+## `use_small_heuristics`
 
-## `same_line_attributes`
-
-Try to put attributes on the same line as fields and variants
+Whether to use different formatting for items and expressions if they satisfy a heuristic notion of 'small'.
 
 - **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 {
+    Ipsum,
+    Dolor(bool),
+    Sit { amet: Consectetur, adipiscing: Elit },
 }
 
-enum Lorem {
-    #[serde(skip_serializing)] Ipsum,
-    #[serde(skip_serializing)] Dolor,
-    #[serde(skip_serializing)] Amet,
+fn main() {
+    lorem(
+        "lorem",
+        "ipsum",
+        "dolor",
+        "sit",
+        "amet",
+        "consectetur",
+        "adipiscing",
+    );
+
+    let lorem = Lorem {
+        ipsum: dolor,
+        sit: amet,
+    };
+    let lorem = Lorem { ipsum: dolor };
+
+    let lorem = if ipsum { dolor } else { sit };
 }
 ```
 
 #### `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,
+    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`
 
@@ -348,91 +343,47 @@ Where to put a binary operator when a binary expression goes multiline.
 
 - **Default value**: `"Front"`
 - **Possible values**: `"Front"`, `"Back"`
+- **Stable**: No
 
 #### `"Front"` (default):
 
 ```rust
-let or = foo
-    || bar
-    || foobar;
+fn main() {
+    let or = foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
+        || barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar;
 
-let sum = 1234
-    + 5678
-    + 910;
+    let sum = 123456789012345678901234567890
+        + 123456789012345678901234567890
+        + 123456789012345678901234567890;
 
-let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    ..bbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
+    let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+        ..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
+}
 ```
 
 #### `"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();
-```
-
-See also [`chain_width`](#chain_width).
-
-## `chain_width`
-
-Maximum length of a chain to fit on a single line
+fn main() {
+    let or = foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo ||
+        barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar;
 
-- **Default value**: `60`
-- **Possible values**: any positive integer
+    let sum = 123456789012345678901234567890 +
+        123456789012345678901234567890 +
+        123456789012345678901234567890;
 
-#### Lines shorter than `chain_width`:
-```rust
-let lorem = ipsum.dolor().sit().amet().consectetur().adipiscing().elit();
+    let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..
+        bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
+}
 ```
 
-#### Lines longer than `chain_width`:
-See [`chain_indent`](#chain_indent).
-
-
 ## `combine_control_expr`
 
 Combine control expressions with function calls.
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `true` (default):
 
@@ -540,15 +491,16 @@ Maximum length of comments. No effect unless`wrap_comments = true`.
 
 - **Default value**: `80`
 - **Possible values**: any positive integer
+- **Stable**: No
 
 **Note:** A value of `0` results in [`wrap_comments`](#wrap_comments) being applied regardless of a line's width.
 
-#### Comments shorter than `comment_width`:
+#### `80` (default; comments shorter than `comment_width`):
 ```rust
 // Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 ```
 
-#### Comments longer than `comment_width`:
+#### `60` (comments longer than `comment_width`):
 ```rust
 // Lorem ipsum dolor sit amet,
 // consectetur adipiscing elit.
@@ -562,17 +514,23 @@ Replace strings of _ wildcards by a single .. in tuple patterns
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `false` (default):
 
 ```rust
-let (lorem, ipsum, _, _) = (1, 2, 3, 4);
+fn main() {
+    let (lorem, ipsum, _, _) = (1, 2, 3, 4);
+    let (lorem, ipsum, ..) = (1, 2, 3, 4);
+}
 ```
 
 #### `true`:
 
 ```rust
-let (lorem, ipsum, ..) = (1, 2, 3, 4);
+fn main() {
+    let (lorem, ipsum, ..) = (1, 2, 3, 4);
+}
 ```
 
 ## `control_brace_style`
@@ -581,38 +539,45 @@ Brace style for control flow constructs
 
 - **Default value**: `"AlwaysSameLine"`
 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
+- **Stable**: No
 
 #### `"AlwaysSameLine"` (default):
 
 ```rust
-if lorem {
-    println!("ipsum!");
-} else {
-    println!("dolor!");
+fn main() {
+    if lorem {
+        println!("ipsum!");
+    } else {
+        println!("dolor!");
+    }
 }
 ```
 
 #### `"AlwaysNextLine"`:
 
 ```rust
-if lorem
-{
-    println!("ipsum!");
-}
-else
-{
-    println!("dolor!");
+fn main() {
+    if lorem
+    {
+        println!("ipsum!");
+    }
+    else
+    {
+        println!("dolor!");
+    }
 }
 ```
 
 #### `"ClosingNextLine"`:
 
 ```rust
-if lorem {
-    println!("ipsum!");
-}
-else {
-    println!("dolor!");
+fn main() {
+    if lorem {
+        println!("ipsum!");
+    }
+    else {
+        println!("dolor!");
+    }
 }
 ```
 
@@ -622,31 +587,37 @@ Don't reformat anything
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 ## `error_on_line_overflow`
 
-Error if unable to get all lines within `max_width`
+Error if Rustfmt is unable to get all lines within `max_width`, except for comments and string
+literals. If this happens, then it is a bug in Rustfmt. You might be able to work around the bug by
+refactoring your code to avoid long/complex expressions, usually by extracting a local variable or
+using a shorter name.
 
-- **Default value**: `true`
+- **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 See also [`max_width`](#max_width).
 
-## `error_on_line_overflow_comments`
+## `error_on_unformatted`
 
-Error if unable to get all comment lines within `comment_width`.
+Error if unable to get comments or string literals within `max_width`, or they are left with
+trailing whitespaces.
 
-- **Default value**: `true`
+- **Default value**: `false`
 - **Possible values**: `true`, `false`
-
-See also [`comment_width`](#comment_width).
+- **Stable**: No
 
 ## `fn_args_density`
 
 Argument density in functions
 
 - **Default value**: `"Tall"`
-- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
+- **Possible values**: `"Compressed"`, `"Tall"`, `"Vertical"`
+- **Stable**: No
 
 #### `"Tall"` (default):
 
@@ -706,19 +677,34 @@ trait Lorem {
 }
 ```
 
-#### `"CompressedIfEmpty"`:
+#### `"Vertical"`:
 
 ```rust
 trait Lorem {
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
+    fn lorem(
+        ipsum: Ipsum,
+        dolor: Dolor,
+        sit: Sit,
+        amet: Amet,
+    );
 
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
+    fn lorem(
+        ipsum: Ipsum,
+        dolor: Dolor,
+        sit: Sit,
+        amet: Amet,
+    ) {
         // body
     }
 
     fn lorem(
-        ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
-        adipiscing: Adipiscing, elit: Elit,
+        ipsum: Ipsum,
+        dolor: Dolor,
+        sit: Sit,
+        amet: Amet,
+        consectetur: Consectetur,
+        adipiscing: Adipiscing,
+        elit: Elit,
     );
 
     fn lorem(
@@ -735,42 +721,6 @@ trait Lorem {
 }
 ```
 
-#### `"Vertical"`:
-
-```rust
-trait Lorem {
-    fn lorem(ipsum: Ipsum,
-             dolor: Dolor,
-             sit: Sit,
-             amet: Amet);
-
-    fn lorem(ipsum: Ipsum,
-             dolor: Dolor,
-             sit: Sit,
-             amet: Amet) {
-        // 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: Consectetur,
-             adipiscing: Adipiscing,
-             elit: Elit) {
-        // body
-    }
-}
-```
-
 
 ## `brace_style`
 
@@ -778,6 +728,7 @@ Brace style for items
 
 - **Default value**: `"SameLineWhere"`
 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
+- **Stable**: No
 
 ### Functions
 
@@ -849,7 +800,8 @@ struct Lorem {
 }
 
 struct Dolor<T>
-    where T: Eq
+where
+    T: Eq,
 {
     sit: T,
 }
@@ -864,7 +816,8 @@ struct Lorem
 }
 
 struct Dolor<T>
-    where T: Eq
+where
+    T: Eq,
 {
     sit: T,
 }
@@ -878,40 +831,27 @@ struct Lorem {
 }
 
 struct Dolor<T>
-    where T: Eq {
+where
+    T: Eq, {
     sit: T,
 }
 ```
 
-## `fn_call_width`
-
-Maximum width of the args of a function call before falling back to vertical formatting
-
-- **Default value**: `60`
-- **Possible values**: any positive integer
-
-**Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
-
-#### Function call shorter than `fn_call_width`:
-```rust
-lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
-```
-
-#### Function call longer than `fn_call_width`:
-
-See [`indent_style`](#indent_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`
+- **Stable**: No
 
 #### `true` (default):
 
 ```rust
 fn lorem() {}
+
+impl Lorem {}
 ```
 
 #### `false`:
@@ -919,9 +859,12 @@ fn lorem() {}
 ```rust
 fn lorem() {
 }
+
+impl Lorem {
+}
 ```
 
-See also [`control_brace_style`](#control_brace_style).
+See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_style).
 
 
 ## `fn_single_line`
@@ -930,6 +873,7 @@ Put single-expression functions on a single line
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `false` (default):
 
@@ -957,12 +901,46 @@ fn lorem() -> usize {
 
 See also [`control_brace_style`](#control_brace_style).
 
+
+## `where_single_line`
+
+Forces the `where` clause to be laid out on a single line.
+
+- **Default value**: `false`
+- **Possible values**: `true`, `false`
+- **Stable**: No
+
+#### `false` (default):
+
+```rust
+impl<T> Lorem for T
+where
+    Option<T>: Ipsum,
+{
+    // body
+}
+```
+
+#### `true`:
+
+```rust
+impl<T> Lorem for T
+where Option<T>: Ipsum
+{
+    // body
+}
+```
+
+See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_style).
+
+
 ## `force_explicit_abi`
 
 Always print the abi for extern items
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
+- **Stable**: Yes
 
 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
 
@@ -988,19 +966,24 @@ Format string literals where necessary
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `false` (default):
 
 ```rust
-let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit";
+fn main() {
+    let lorem =
+        "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit amet consectetur adipiscing";
+}
 ```
 
 #### `true`:
 
 ```rust
-let lorem =
-    "ipsum dolor sit amet consectetur \
-     adipiscing elit lorem ipsum dolor sit";
+fn main() {
+    let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit amet \
+                 consectetur adipiscing";
+}
 ```
 
 See also [`max_width`](#max_width).
@@ -1011,6 +994,7 @@ Use tab characters for indentation, spaces for alignment
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: Yes
 
 #### `false` (default):
 
@@ -1030,58 +1014,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`
-
-#### `true` (default):
-
-```rust
-impl Lorem {}
-```
-
-#### `false`:
-
-```rust
-impl Lorem {
-}
-```
-
-See also [`brace_style`](#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`
-
-#### `true` (default):
-
-```rust
-match lorem {
-    Lorem::Ipsum => (),
-    Lorem::Dolor => (),
-    Lorem::Sit => (),
-    Lorem::Amet => (),
-}
-```
-
-#### `false`:
-
-```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`
 
@@ -1089,22 +1021,21 @@ Indent style of imports
 
 - **Default Value**: `"Visual"`
 - **Possible values**: `"Block"`, `"Visual"`
+- **Stable**: No
 
 #### `"Visual"` (default):
 
 ```rust
-use foo::{xxx,
-          yyy,
-          zzz};
+use foo::{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
+          zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz};
 ```
 
 #### `"Block"`:
 
 ```rust
 use foo::{
-    xxx,
-    yyy,
-    zzz,
+    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
+    zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,
 };
 ```
 
@@ -1116,19 +1047,22 @@ Item layout inside a imports block
 
 - **Default value**: "Mixed"
 - **Possible values**: "Horizontal", "HorizontalVertical", "Mixed", "Vertical"
+- **Stable**: No
 
 #### `"Mixed"` (default):
 
 ```rust
-use foo::{xxx, yyy, zzz};
+use foo::{xxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyy, zzzzzzzzzzzzzzzzzz};
 
-use foo::{aaa, bbb, ccc,
-          ddd, eee, fff};
+use foo::{
+    aaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbb, cccccccccccccccccc, dddddddddddddddddd,
+    eeeeeeeeeeeeeeeeee, ffffffffffffffffff,
+};
 ```
 
 #### `"Horizontal"`:
 
-**Note**: This option forces to put everything on one line and may exceeds `max_width`.
+**Note**: This option forces all imports onto one line and may exceed `max_width`.
 
 ```rust
 use foo::{xxx, yyy, zzz};
@@ -1139,72 +1073,59 @@ use foo::{aaa, bbb, ccc, ddd, eee, fff};
 #### `"HorizontalVertical"`:
 
 ```rust
-use foo::{xxx, yyy, zzz};
+use foo::{xxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyy, zzzzzzzzzzzzzzzzzz};
 
-use foo::{aaa,
-          bbb,
-          ccc,
-          ddd,
-          eee,
-          fff};
+use foo::{
+    aaaaaaaaaaaaaaaaaa,
+    bbbbbbbbbbbbbbbbbb,
+    cccccccccccccccccc,
+    dddddddddddddddddd,
+    eeeeeeeeeeeeeeeeee,
+    ffffffffffffffffff,
+};
 ```
 
 #### `"Vertical"`:
 
 ```rust
-use foo::{xxx,
-          yyy,
-          zzz};
-
-use foo::{aaa,
-          bbb,
-          ccc,
-          ddd,
-          eee,
-          fff};
-```
+use foo::{
+    xxx,
+    yyy,
+    zzz,
+};
+
+use foo::{
+    aaa,
+    bbb,
+    ccc,
+    ddd,
+    eee,
+    fff,
+};
+```
 
-## `match_arm_forces_newline`
+## `merge_imports`
 
-Consistently put match arms (block based or not) in a newline.
+Merge multiple imports into a single nested import.
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `false` (default):
 
 ```rust
-match x {
-    // a non-empty block
-    X0 => {
-        f();
-    }
-    // an empty block
-    X1 => {}
-    // a non-block
-    X2 => println!("ok"),
-}
+use foo::{a, c, d};
+use foo::{b, g};
+use foo::{e, f};
 ```
 
 #### `true`:
 
 ```rust
-match x {
-    // a non-empty block
-    X0 => {
-        f();
-    }
-    // an empty block
-    X1 =>
-        {}
-    // a non-block
-    X2 => {
-        println!("ok")
-    }
-}
+use foo::{a, b, c, d, e, f, g};
 ```
 
-See also: [`wrap_match_arms`](#wrap_match_arms).
 
 ## `match_block_trailing_comma`
 
@@ -1212,30 +1133,35 @@ Put a trailing comma after a block based match arm (non-block arms are not affec
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `false` (default):
 
 ```rust
-match lorem {
-    Lorem::Ipsum => {
-        println!("ipsum");
+fn main() {
+    match lorem {
+        Lorem::Ipsum => {
+            println!("ipsum");
+        }
+        Lorem::Dolor => println!("dolor"),
     }
-    Lorem::Dolor => println!("dolor"),
 }
 ```
 
 #### `true`:
 
 ```rust
-match lorem {
-    Lorem::Ipsum => {
-        println!("ipsum");
-    },
-    Lorem::Dolor => println!("dolor"),
+fn main() {
+    match lorem {
+        Lorem::Ipsum => {
+            println!("ipsum");
+        },
+        Lorem::Dolor => println!("dolor"),
+    }
 }
 ```
 
-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`
 
@@ -1243,6 +1169,7 @@ Maximum width of each line
 
 - **Default value**: `100`
 - **Possible values**: any positive integer
+- **Stable**: Yes
 
 See also [`error_on_line_overflow`](#error_on_line_overflow).
 
@@ -1252,6 +1179,7 @@ Merge multiple derives into a single one.
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
+- **Stable**: Yes
 
 #### `true` (default):
 
@@ -1269,71 +1197,62 @@ pub enum Foo {}
 pub enum Foo {}
 ```
 
-## `multiline_closure_forces_block`
+## `force_multiline_blocks`
 
-Force multiline closure bodies to be wrapped in a block
+Force multiline closure and match arm bodies to be wrapped in a block
 
 - **Default value**: `false`
 - **Possible values**: `false`, `true`
+- **Stable**: No
 
 #### `false` (default):
 
 ```rust
-result.and_then(|maybe_value| match maybe_value {
-    None => ...,
-    Some(value) => ...,
-})
-```
-
-#### `true`:
-
-```rust
+fn main() {
+    result.and_then(|maybe_value| match maybe_value {
+        None => foo(),
+        Some(value) => bar(),
+    });
 
-result.and_then(|maybe_value| {
-    match maybe_value {
-        None => ...,
-        Some(value) => ...,
+    match lorem {
+        None => if ipsum {
+            println!("Hello World");
+        },
+        Some(dolor) => foo(),
     }
-})
-```
-
-## `multiline_match_arm_forces_block`
-
-Force multiline match arm bodies to be wrapped in a block
-
-- **Default value**: `false`
-- **Possible values**: `false`, `true`
-
-#### `false` (default):
-
-```rust
-match lorem {
-    None => if ipsum {
-        println!("Hello World");
-    },
-    Some(dolor) => ...,
 }
 ```
 
 #### `true`:
 
 ```rust
-match lorem {
-    None => {
-        if ipsum {
-            println!("Hello World");
+fn main() {
+    result.and_then(|maybe_value| {
+        match maybe_value {
+            None => foo(),
+            Some(value) => bar(),
+        }
+    });
+
+    match lorem {
+        None => {
+            if ipsum {
+                println!("Hello World");
+            }
         }
+        Some(dolor) => foo(),
     }
-    Some(dolor) => ...,
 }
 ```
 
+
 ## `newline_style`
 
 Unix or Windows line endings
 
 - **Default value**: `"Unix"`
 - **Possible values**: `"Native"`, `"Unix"`, `"Windows"`
+- **Stable**: Yes
 
 ## `normalize_comments`
 
@@ -1341,6 +1260,7 @@ Convert /* */ comments to // comments where possible
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `false` (default):
 
@@ -1362,44 +1282,40 @@ fn dolor() -> usize {}
 fn adipiscing() -> usize {}
 ```
 
-## `reorder_imported_names`
+## `remove_nested_parens`
 
-Reorder lists of names in import statements alphabetically
+Remove nested parens.
 
-- **Default value**: `false`
+- **Default value**: `true`,
 - **Possible values**: `true`, `false`
+- **Stable**: Yes
 
-#### `false` (default):
 
+#### `true` (default):
 ```rust
-use super::{lorem, ipsum, dolor, sit};
+fn main() {
+    (foo());
+}
 ```
 
-#### `true`:
-
+#### `false`:
 ```rust
-use super::{dolor, ipsum, lorem, sit};
+fn main() {
+    ((((foo()))));
+}
 ```
 
-See also [`reorder_imports`](#reorder_imports).
 
 ## `reorder_imports`
 
-Reorder import statements alphabetically
+Reorder import and extern crate statements alphabetically in groups (a group is
+separated by a newline).
 
-- **Default value**: `false`
+- **Default value**: `true`
 - **Possible values**: `true`, `false`
+- **Stable**: Yes
 
-#### `false` (default):
-
-```rust
-use lorem;
-use ipsum;
-use dolor;
-use sit;
-```
-
-#### `true`:
+#### `true` (default):
 
 ```rust
 use dolor;
@@ -1408,104 +1324,86 @@ use lorem;
 use sit;
 ```
 
-See also [`reorder_imported_names`](#reorder_imported_names), [`reorder_imports_in_group`](#reorder_imports_in_group).
-
-## `reorder_imports_in_group`
-
-Reorder import statements in group
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-**Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
-
-#### `false` (default):
+#### `false`:
 
 ```rust
-use std::mem;
-use std::io;
-
 use lorem;
 use ipsum;
 use dolor;
 use sit;
 ```
 
-#### `true`:
-
-```rust
-use std::io;
-use std::mem;
-
-use dolor;
-use ipsum;
-use lorem;
-use sit;
-```
-
-See also [`reorder_imports`](#reorder_imports).
 
-## `reorder_extern_crates`
+## `reorder_modules`
 
-Reorder `extern crate` statements alphabetically
+Reorder `mod` declarations alphabetically in group.
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
+- **Stable**: Yes
 
-#### `true` (default):
+#### `true` (default)
 
 ```rust
-extern crate dolor;
-extern crate ipsum;
-extern crate lorem;
-extern crate sit;
+mod a;
+mod b;
+
+mod dolor;
+mod ipsum;
+mod lorem;
+mod sit;
 ```
 
-#### `false`:
+#### `false`
 
 ```rust
-extern crate lorem;
-extern crate ipsum;
-extern crate dolor;
-extern crate sit;
+mod b;
+mod a;
+
+mod lorem;
+mod ipsum;
+mod dolor;
+mod sit;
 ```
 
-See also [`reorder_extern_crates_in_group`](#reorder_extern_crates_in_group).
+**Note** `mod` with `#[macro_export]` will not be reordered since that could change the semantic
+of the original source code.
 
-## `reorder_extern_crates_in_group`
+## `reorder_impl_items`
 
-Reorder `extern crate` statements in group
+Reorder impl items. `type` and `const` are put first, then macros and methods.
 
-- **Default value**: `true`
+- **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
-**Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
-
-#### `true` (default):
+#### `false` (default)
 
 ```rust
-extern crate a;
-extern crate b;
+struct Dummy;
+
+impl Iterator for Dummy {
+    fn next(&mut self) -> Option<Self::Item> {
+        None
+    }
 
-extern crate dolor;
-extern crate ipsum;
-extern crate lorem;
-extern crate sit;
+    type Item = i32;
+}
 ```
 
-#### `false`:
+#### `true`
 
 ```rust
-extern crate b;
-extern crate a;
+struct Dummy;
 
-extern crate lorem;
-extern crate ipsum;
-extern crate dolor;
-extern crate sit;
-```
+impl Iterator for Dummy {
+    type Item = i32;
 
-See also [`reorder_extern_crates`](#reorder_extern_crates).
+    fn next(&mut self) -> Option<Self::Item> {
+        None
+    }
+}
+```
 
 ## `report_todo`
 
@@ -1513,6 +1411,7 @@ Report `TODO` items in comments.
 
 - **Default value**: `"Never"`
 - **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"`
+- **Stable**: No
 
 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
@@ -1526,6 +1425,7 @@ Report `FIXME` items in comments.
 
 - **Default value**: `"Never"`
 - **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"`
+- **Stable**: No
 
 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
@@ -1533,30 +1433,6 @@ it contains a `#X` (with `X` being a number) in parentheses following the
 
 See also [`report_todo`](#report_todo).
 
-## `single_line_if_else_max_width`
-
-Maximum line length for single line if-else expressions.
-
-- **Default value**: `50`
-- **Possible values**: any positive integer
-
-**Note:** A value of `0` results in if-else expressions being broken regardless of their line's width.
-
-#### Lines shorter than `single_line_if_else_max_width`:
-```rust
-let lorem = if ipsum { dolor } else { sit };
-```
-
-#### Lines longer than `single_line_if_else_max_width`:
-```rust
-let lorem = if ipsum {
-    dolor
-} else {
-    sit
-};
-```
-
-See also: [`control_brace_style`](#control_brace_style).
 
 ## `skip_children`
 
@@ -1564,6 +1440,7 @@ Don't reformat out of line modules
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 ## `space_after_colon`
 
@@ -1571,6 +1448,7 @@ Leave a space after the colon.
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `true` (default):
 
@@ -1602,6 +1480,7 @@ Leave a space before the colon.
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `false` (default):
 
@@ -1633,6 +1512,7 @@ The maximum diff of width between struct fields to be aligned with each other.
 
 - **Default value** : 0
 - **Possible values**: any positive integer
+- **Stable**: No
 
 #### `0` (default):
 
@@ -1654,170 +1534,91 @@ struct Foo {
 }
 ```
 
-```
-
 ## `spaces_around_ranges`
 
-Put spaces around the .. and ... range operators
+Put spaces around the .., ..=, and ... range operators
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `false` (default):
 
 ```rust
-let lorem = 0..10;
-```
-
-#### `true`:
-
-```rust
-let lorem = 0 .. 10;
-```
-
-## `spaces_within_parens_and_brackets`
-
-Put spaces within non-empty generic arguments
+fn main() {
+    let lorem = 0..10;
+    let ipsum = 0..=10;
 
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
+    match lorem {
+        1..5 => foo(),
+        _ => bar,
+    }
 
-#### `false` (default):
+    match lorem {
+        1..=5 => foo(),
+        _ => bar,
+    }
 
-```rust
-fn lorem<T: Eq>(t: T) {
-    // body
+    match lorem {
+        1...5 => foo(),
+        _ => bar,
+    }
 }
 ```
 
 #### `true`:
 
 ```rust
-fn lorem< T: Eq >(t: T) {
-    // body
-}
-```
+fn main() {
+    let lorem = 0 .. 10;
+    let ipsum = 0 ..= 10;
 
-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_and_brackets`
-
-Put spaces within non-empty parentheses
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-#### `false` (default):
-
-```rust
-fn lorem<T: Eq>(t: T) {
-    let lorem = (ipsum, dolor);
-}
-```
+    match lorem {
+        1 .. 5 => foo(),
+        _ => bar,
+    }
 
-#### `true`:
+    match lorem {
+        1 ..= 5 => foo(),
+        _ => bar,
+    }
 
-```rust
-fn lorem<T: Eq>( t: T ) {
-    let lorem = ( ipsum, dolor );
+    match lorem {
+        1 ... 5 => foo(),
+        _ => bar,
+    }
 }
 ```
 
-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_and_brackets`
-
-Put spaces within non-empty square brackets
-
-- **Default value**: `false`
-- **Possible values**: `true`, `false`
-
-#### `false` (default):
-
-```rust
-let lorem: [usize; 2] = [ipsum, dolor];
-```
-
-#### `true`:
-
-```rust
-let lorem: [ usize; 2 ] = [ ipsum, dolor ];
-```
-
-See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
-
 ## `struct_lit_single_line`
 
 Put small struct literals on a single line
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `true` (default):
 
 ```rust
-let lorem = Lorem { ipsum: dolor, sit: amet };
+fn main() {
+    let lorem = Lorem { foo: bar, baz: ofo };
+}
 ```
 
 #### `false`:
 
 ```rust
-let lorem = Lorem {
-    ipsum: dolor,
-    sit: amet,
-};
-```
-
-See also: [`indent_style`](#indent_style), [`struct_lit_width`](#struct_lit_width).
-
-## `struct_lit_width`
-
-Maximum width in the body of a struct lit before falling back to vertical formatting
-
-- **Default value**: `18`
-- **Possible values**: any positive integer
-
-**Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
-
-#### Lines shorter than `struct_lit_width`:
-```rust
-let lorem = Lorem { ipsum: dolor, sit: amet };
-```
-
-#### Lines longer than `struct_lit_width`:
-See [`indent_style`](#indent_style).
-
-See also: [`struct_lit_single_line`](#struct_lit_single_line), [`indent_style`](#indent_style).
-
-## `struct_variant_width`
-
-Maximum width in the body of a struct variant before falling back to vertical formatting
-
-- **Default value**: `35`
-- **Possible values**: any positive integer
-
-**Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
-
-#### Struct variants shorter than `struct_variant_width`:
-```rust
-enum Lorem {
-    Ipsum,
-    Dolor(bool),
-    Sit { amet: Consectetur, adipiscing: Elit },
+fn main() {
+    let lorem = Lorem {
+        foo: bar,
+        baz: ofo,
+    };
 }
 ```
 
-#### Struct variants longer than `struct_variant_width`:
-```rust
-enum Lorem {
-    Ipsum,
-    Dolor(bool),
-    Sit {
-        amet: Consectetur,
-        adipiscing: Elit,
-    },
-}
-```
+See also: [`indent_style`](#indent_style).
+
 
 ## `tab_spaces`
 
@@ -1825,6 +1626,7 @@ Number of spaces per tab
 
 - **Default value**: `4`
 - **Possible values**: any positive integer
+- **Stable**: Yes
 
 #### `4` (default):
 
@@ -1832,7 +1634,8 @@ Number of spaces per tab
 fn lorem() {
     let ipsum = dolor();
     let sit = vec![
-        "amet consectetur adipiscing elit."
+        "amet consectetur adipiscing elit amet",
+        "consectetur adipiscing elit amet consectetur.",
     ];
 }
 ```
@@ -1843,7 +1646,8 @@ fn lorem() {
 fn lorem() {
   let ipsum = dolor();
   let sit = vec![
-    "amet consectetur adipiscing elit."
+    "amet consectetur adipiscing elit amet",
+    "consectetur adipiscing elit amet consectetur.",
   ];
 }
 ```
@@ -1857,47 +1661,54 @@ How to handle trailing commas for lists
 
 - **Default value**: `"Vertical"`
 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
+- **Stable**: No
 
 #### `"Vertical"` (default):
 
 ```rust
-let Lorem { ipsum, dolor, sit } = amet;
-let Lorem {
-    ipsum,
-    dolor,
-    sit,
-    amet,
-    consectetur,
-    adipiscing,
-} = elit;
+fn main() {
+    let Lorem { ipsum, dolor, sit } = amet;
+    let Lorem {
+        ipsum,
+        dolor,
+        sit,
+        amet,
+        consectetur,
+        adipiscing,
+    } = elit;
+}
 ```
 
 #### `"Always"`:
 
 ```rust
-let Lorem { ipsum, dolor, sit, } = amet;
-let Lorem {
-    ipsum,
-    dolor,
-    sit,
-    amet,
-    consectetur,
-    adipiscing,
-} = elit;
+fn main() {
+    let Lorem { ipsum, dolor, sit, } = amet;
+    let Lorem {
+        ipsum,
+        dolor,
+        sit,
+        amet,
+        consectetur,
+        adipiscing,
+    } = elit;
+}
 ```
 
 #### `"Never"`:
 
 ```rust
-let Lorem { ipsum, dolor, sit } = amet;
-let Lorem {
-    ipsum,
-    dolor,
-    sit,
-    amet,
-    consectetur,
-    adipiscing
-} = elit;
+fn main() {
+    let Lorem { ipsum, dolor, sit } = amet;
+    let Lorem {
+        ipsum,
+        dolor,
+        sit,
+        amet,
+        consectetur,
+        adipiscing
+    } = elit;
+}
 ```
 
 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
@@ -1908,6 +1719,7 @@ Add trailing semicolon after break, continue and return
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
 #### `true` (default):
 ```rust
@@ -1929,12 +1741,13 @@ Determines if `+` or `=` are wrapped in spaces in the punctuation of types
 
 - **Default value**: `"Wide"`
 - **Possible values**: `"Compressed"`, `"Wide"`
+- **Stable**: No
 
 #### `"Wide"` (default):
 
 ```rust
 fn lorem<Ipsum: Dolor + Sit = Amet>() {
-       // body
+    // body
 }
 ```
 
@@ -1942,243 +1755,320 @@ fn lorem<Ipsum: Dolor + Sit = Amet>() {
 
 ```rust
 fn lorem<Ipsum: Dolor+Sit=Amet>() {
-       // body
+    // body
 }
 ```
 
-## `use_try_shorthand`
+## `use_field_init_shorthand`
 
-Replace uses of the try! macro by the ? shorthand
+Use field initialize shorthand if possible.
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: Yes
 
 #### `false` (default):
 
 ```rust
-let lorem = try!(ipsum.map(|dolor|dolor.sit()));
+struct Foo {
+    x: u32,
+    y: u32,
+    z: u32,
+}
+
+fn main() {
+    let x = 1;
+    let y = 2;
+    let z = 3;
+    let a = Foo { x: x, y: y, z: z };
+}
 ```
 
 #### `true`:
 
 ```rust
-let lorem = ipsum.map(|dolor| dolor.sit())?;
+struct Foo {
+    x: u32,
+    y: u32,
+    z: u32,
+}
+
+fn main() {
+    let x = 1;
+    let y = 2;
+    let z = 3;
+    let a = Foo { x, y, z };
+}
 ```
 
-## `where_density`
+## `use_try_shorthand`
 
-Density of a where clause.
+Replace uses of the try! macro by the ? shorthand
 
-- **Default value**: `"Vertical"`
-- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
+- **Default value**: `false`
+- **Possible values**: `true`, `false`
+- **Stable**: Yes
 
-#### `"Vertical"` (default):
+#### `false` (default):
 
 ```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq;
+fn main() {
+    let lorem = try!(ipsum.map(|dolor| dolor.sit()));
+}
+```
 
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
-    }
+#### `true`:
+
+```rust
+fn main() {
+    let lorem = ipsum.map(|dolor| dolor.sit())?;
 }
 ```
 
-**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
 
-#### `"CompressedIfEmpty"`:
+## `wrap_comments`
 
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq;
+Break comments to fit on the line
 
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
-    }
-}
+- **Default value**: `false`
+- **Possible values**: `true`, `false`
+- **Stable**: No
+
+#### `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.
 ```
 
-#### `"Compressed"`:
+#### `true`:
 
 ```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq;
+// 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.
+```
 
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq {
-        // body
+## `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`
+- **Stable**: No
+
+#### `true` (default):
+
+```rust
+fn main() {
+    match lorem {
+        true => {
+            foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
+        }
+        false => println!("{}", sit),
     }
 }
 ```
 
-#### `"Tall"`:
+#### `false`:
 
 ```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
+fn main() {
+    match lorem {
+        true =>
+            foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
+        false => println!("{}", sit),
     }
 }
 ```
 
-**Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
+See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
 
-See also: [`where_layout`](#where_layout), [`indent_style`](#indent_style).
 
-## `where_layout`
+## `blank_lines_upper_bound`
 
-Element layout inside a where clause
+Maximum number of blank lines which can be put between items. If more than this number of consecutive empty
+lines are found, they are trimmed down to match this integer.
 
-- **Default value**: `"Vertical"`
-- **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
+- **Default value**: `1`
+- **Possible values**: *unsigned integer*
+- **Stable**: No
 
-#### `"Vertical"` (default):
+### Example
+Original Code:
 
 ```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur
-{
-    // body
+#![rustfmt::skip]
+
+fn foo() {
+    println!("a");
 }
 
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing,
-          Amet: AmetConsecteturAdipiscingElit
-{
-    // body
+
+
+fn bar() {
+    println!("b");
+
+
+    println!("c");
 }
 ```
 
-#### `"Horizontal"`:
-
+#### `1` (default):
 ```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
+fn foo() {
+    println!("a");
 }
 
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
-{
-    // body
+fn bar() {
+    println!("b");
+
+    println!("c");
 }
 ```
 
-#### `"HorizontalVertical"`:
-
+#### `2` (default):
 ```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
+fn foo() {
+    println!("a");
 }
 
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing,
-          Amet: AmetConsecteturAdipiscingElit
-{
-    // body
+
+fn bar() {
+    println!("b");
+
+
+    println!("c");
 }
 ```
 
-#### `"Mixed"`:
+See also: [`blank_lines_lower_bound`](#blank_lines_lower_bound)
+
+## `blank_lines_lower_bound`
+
+Minimum number of blank lines which must be put between items. If two items have fewer blank lines between
+them, additional blank lines are inserted.
+
+- **Default value**: `0`
+- **Possible values**: *unsigned integer*
+- **Stable**: No
+
+### Example
+Original Code (rustfmt will not change it with the default value of `0`):
 
 ```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
+#![rustfmt::skip]
+
+fn foo() {
+    println!("a");
 }
+fn bar() {
+    println!("b");
+    println!("c");
+}
+```
 
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
-{
-    // body
+#### `1`
+```rust
+fn foo() {
+
+    println!("a");
+}
+
+fn bar() {
+
+    println!("b");
+
+    println!("c");
 }
 ```
 
-See also: [`where_density`](#where_density), [`indent_style`](#indent_style).
 
-## `wrap_comments`
+## `required_version`
 
-Break comments to fit on the line
+Require a specific version of rustfmt. If you want to make sure that the
+specific version of rustfmt is used in your CI, use this option.
+
+- **Default value**: `CARGO_PKG_VERSION`
+- **Possible values**: any published version (e.g. `"0.3.8"`)
+- **Stable**: No
+
+## `hide_parse_errors`
+
+Do not show parse errors if the parser failed to parse files.
 
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
+- **Stable**: No
 
-#### `false` (default):
+## `color`
 
-```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.
-```
+Whether to use colored output or not.
 
-#### `true`:
+- **Default value**: `"Auto"`
+- **Possible values**: "Auto", "Always", "Never"
+- **Stable**: No
 
-```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.
+## `unstable_features`
+
+Enable unstable features on stable channel.
+
+- **Default value**: `false`
+- **Possible values**: `true`, `false`
+- **Stable**: No
+
+## `license_template_path`
+
+Check whether beginnings of files match a license template.
+
+- **Default value**: `""``
+- **Possible values**: path to a license template file
+- **Stable**: No
+
+A license template is a plain text file which is matched literally against the
+beginning of each source file, except for `{}`-delimited blocks, which are
+matched as regular expressions. The following license template therefore
+matches strings like `// Copyright 2017 The Rust Project Developers.`, `//
+Copyright 2018 The Rust Project Developers.`, etc.:
+
+```
+// Copyright {\d+} The Rust Project Developers.
 ```
 
-## `wrap_match_arms`
+`\{`, `\}` and `\\` match literal braces / backslashes.
 
-Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
+## `ignore`
 
-- **Default value**: `true`
-- **Possible values**: `true`, `false`
+Skip formatting the specified files and directories.
 
-#### `true` (default):
+- **Default value**: format every files
+- **Possible values**: See an example below
+- **Stable**: No
 
-```rust
-match lorem {
-    true => {
-        foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
-    }
-    false => println!("{}", sit),
-}
+### Example
+
+If you want to ignore specific files, put the following to your config file:
+
+```toml
+ignore = [
+    "src/types.rs",
+    "src/foo/bar.rs",
+]
 ```
 
-#### `false`:
+If you want to ignore every file under `examples/`, put the following to your config file:
 
-```rust
-match lorem {
-    true =>
-        foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
-    false => println!("{}", sit),
-}
+```toml
+ignore [
+    "examples",
+]
 ```
 
-See also: [`indent_match_arms`](#indent_match_arms), [`match_block_trailing_comma`](#match_block_trailing_comma).
+## `emit_mode`
 
-## `write_mode`
+Internal option
 
-What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage
+## `make_backup`
 
-- **Default value**: `"Overwrite"`
-- **Possible values**: `"Checkstyle"`, `"Coverage"`, `"Diff"`, `"Display"`, `"Overwrite"`, `"Plain"`, `"Replace"`
+Internal option, use `--backup`