]> git.lizzy.rs Git - rust.git/commitdiff
Update Configurations.md
authortopecongiro <seuchida@gmail.com>
Tue, 14 Nov 2017 01:49:18 +0000 (10:49 +0900)
committertopecongiro <seuchida@gmail.com>
Tue, 14 Nov 2017 01:49:18 +0000 (10:49 +0900)
Configurations.md

index 6516784c481fb59a495bfef022eee93d66838b59..31e5855bfaa8dcd4e15b9710acac9429198100b8 100644 (file)
@@ -840,13 +840,15 @@ fn lorem
 }
 ```
 
-## `fn_brace_style`
+## `brace_style`
 
-Brace style for functions
+Brace style for items
 
 - **Default value**: `"SameLineWhere"`
 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
 
+### Functions
+
 #### `"SameLineWhere"` (default):
 
 ```rust
@@ -905,6 +907,50 @@ where
 }
 ```
 
+### Structs and enums
+
+#### `"SameLineWhere"` (default):
+
+```rust
+struct Lorem {
+    ipsum: bool,
+}
+
+struct Dolor<T>
+    where T: Eq
+{
+    sit: T,
+}
+```
+
+#### `"AlwaysNextLine"`:
+
+```rust
+struct Lorem
+{
+    ipsum: bool,
+}
+
+struct Dolor<T>
+    where T: Eq
+{
+    sit: T,
+}
+```
+
+#### `"PreferSameLine"`:
+
+```rust
+struct Lorem {
+    ipsum: bool,
+}
+
+struct Dolor<T>
+    where T: Eq {
+    sit: T,
+}
+```
+
 ## `fn_call_width`
 
 Maximum width of the args of a function call before falling back to vertical formatting
@@ -1125,7 +1171,7 @@ impl Lorem {
 }
 ```
 
-See also [`item_brace_style`](#item_brace_style).
+See also [`brace_style`](#brace_style).
 
 ## `indent_match_arms`
 
@@ -1239,55 +1285,6 @@ use foo::{aaa,
           fff};
 ```
 
-## `item_brace_style`
-
-Brace style for structs and enums
-
-- **Default value**: `"SameLineWhere"`
-- **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
-
-#### `"SameLineWhere"` (default):
-
-```rust
-struct Lorem {
-    ipsum: bool,
-}
-
-struct Dolor<T>
-    where T: Eq
-{
-    sit: T,
-}
-```
-
-#### `"AlwaysNextLine"`:
-
-```rust
-struct Lorem
-{
-    ipsum: bool,
-}
-
-struct Dolor<T>
-    where T: Eq
-{
-    sit: T,
-}
-```
-
-#### `"PreferSameLine"`:
-
-```rust
-struct Lorem {
-    ipsum: bool,
-}
-
-struct Dolor<T>
-    where T: Eq {
-    sit: T,
-}
-```
-
 ## `match_arm_forces_newline`
 
 Consistently put match arms (block based or not) in a newline.