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

index 31e5855bfaa8dcd4e15b9710acac9429198100b8..9d74fd0525053f6ecdb0ee402b1e502d5514d72a 100644 (file)
@@ -1719,9 +1719,9 @@ Don't reformat out of line modules
 - **Default value**: `false`
 - **Possible values**: `true`, `false`
 
-## `space_after_bound_colon`
+## `space_after_colon`
 
-Leave a space after the colon in a trait or lifetime bound
+Leave a space after the colon.
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
@@ -1730,102 +1730,29 @@ Leave a space after the colon in a trait or lifetime bound
 
 ```rust
 fn lorem<T: Eq>(t: T) {
-    // body
-}
-```
-
-#### `false`:
-
-```rust
-fn lorem<T:Eq>(t: T) {
-    // body
-}
-```
-
-See also: [`space_before_bound`](#space_before_bound).
-
-## `struct_field_align_threshold`
-
-The maximum diff of width between struct fields to be aligned with each other.
-
-- **Default value** : 0
-- **Possible values**: any positive integer
-
-#### `0` (default):
-
-```rust
-struct Foo {
-    x: u32,
-    yy: u32,
-    zzz: u32,
-}
-```
-
-#### `20`:
-
-```rust
-struct Foo {
-    x:   u32,
-    yy:  u32,
-    zzz: u32,
-}
-```
-
-## `space_after_struct_lit_field_colon`
-
-Leave a space after the colon in a struct literal field
-
-- **Default value**: `true`
-- **Possible values**: `true`, `false`
-
-#### `true` (default):
-
-```rust
-let lorem = Lorem {
-    ipsum: dolor,
-    sit: amet,
-};
-```
-
-#### `false`:
-
-```rust
-let lorem = Lorem {
-    ipsum:dolor,
-    sit:amet,
-};
-```
-
-See also: [`space_before_struct_lit_field_colon`](#space_before_struct_lit_field_colon).
-
-## `space_after_type_annotation_colon`
-
-Leave a space after the colon in a type annotation
-
-- **Default value**: `true`
-- **Possible values**: `true`, `false`
-
-#### `true` (default):
-
-```rust
-fn lorem<T: Eq>(t: T) {
-    let ipsum: Dolor = sit;
+    let lorem: Dolor = Lorem {
+        ipsum: dolor,
+        sit: amet,
+    };
 }
 ```
 
 #### `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`
@@ -1834,71 +1761,54 @@ Leave a space before the colon in a trait or lifetime bound
 
 ```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` (default):
-
-```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` (default):
+#### `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`
 
@@ -1919,7 +1829,7 @@ let lorem = 0..10;
 let lorem = 0 .. 10;
 ```
 
-## `spaces_within_angle_brackets`
+## `spaces_within_parens_and_brackets`
 
 Put spaces within non-empty generic arguments
 
@@ -1942,9 +1852,9 @@ 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
 
@@ -1967,9 +1877,9 @@ fn lorem<T: Eq>( t: T ) {
 }
 ```
 
-See also: [`spaces_within_angle_brackets`](#spaces_within_angle_brackets), [`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_square_brackets`
+## `spaces_within_parens_and_brackets`
 
 Put spaces within non-empty square brackets
 
@@ -1988,7 +1898,7 @@ let lorem: [usize; 2] = [ipsum, dolor];
 let lorem: [ usize; 2 ] = [ ipsum, dolor ];
 ```
 
-See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_angle_brackets`](#spaces_within_angle_brackets).
+See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
 
 ## `struct_lit_multiline_style`