diff --git a/src/items/enumerations.md b/src/items/enumerations.md index c37cb7ab0c..5cb4000bcf 100644 --- a/src/items/enumerations.md +++ b/src/items/enumerations.md @@ -168,13 +168,13 @@ It is an error when two variants share the same discriminant. ```rust,compile_fail enum SharedDiscriminantError { SharedA = 1, - SharedB = 1 + SharedB = 1, } enum SharedDiscriminantError2 { Zero, // 0 One, // 1 - OneToo = 1 // 1 (collision with previous!) + OneToo = 1, // 1 (collision with previous!) } ``` @@ -185,14 +185,14 @@ It is also an error to have an unspecified discriminant where the previous discr #[repr(u8)] enum OverflowingDiscriminantError { Max = 255, - MaxPlusOne // Would be 256, but that overflows the enum. + MaxPlusOne, // Would be 256, but that overflows the enum. } #[repr(u8)] enum OverflowingDiscriminantError2 { MaxMinusOne = 254, // 254 Max, // 255 - MaxPlusOne // Would be 256, but that overflows the enum. + MaxPlusOne, // Would be 256, but that overflows the enum. } ``` @@ -344,7 +344,7 @@ mac_variant! { E } enum E { pub U, pub(crate) T(u8), - pub(super) T { f: String } + pub(super) T { f: String }, } ```