@@ -89,9 +89,9 @@ Under the [default representation], the discriminant is interpreted as
8989an ` isize ` value. However, the compiler is allowed to use a smaller type (or
9090another means of distinguishing variants) in its actual memory layout.
9191
92- ### Assigning Discriminant Values
92+ ### Assigning discriminant values
9393
94- #### Explicit Discriminants
94+ #### Explicit discriminants
9595
9696In two circumstances, the discriminant of a variant may be explicitly set by
9797following the variant name with ` = ` and a [ constant expression] :
@@ -114,7 +114,7 @@ following the variant name with `=` and a [constant expression]:
114114 }
115115 ```
116116
117- #### Implicit Discriminants
117+ #### Implicit discriminants
118118
119119If a discriminant for a variant is not specified, then it is set to one higher
120120than the discriminant of the previous variant in the declaration. If the
@@ -167,7 +167,7 @@ enum OverflowingDiscriminantError2 {
167167}
168168```
169169
170- ### Accessing Discriminant
170+ ### Accessing discriminant
171171
172172#### Via ` mem::discriminant `
173173
@@ -221,7 +221,7 @@ assert_eq!(21, FieldlessWithDiscrimants::Struct{} as u8);
221221assert_eq! (22 , FieldlessWithDiscrimants :: Unit as u8 );
222222```
223223
224- #### Pointer Casting
224+ #### Pointer casting
225225
226226If the enumeration specifies a [ primitive representation] , then the
227227discriminant may be reliably accessed via unsafe pointer casting:
@@ -249,7 +249,7 @@ assert_eq!(1, tuple_like.discriminant());
249249assert_eq! (2 , struct_like . discriminant ());
250250```
251251
252- ## Zero-variant Enums
252+ ## Zero-variant enums
253253
254254Enums with zero variants are known as * zero-variant enums* . As they have
255255no valid values, they cannot be instantiated.
0 commit comments