@@ -766,7 +766,7 @@ impl fmt::Debug for Group {
766766 }
767767}
768768
769- /// An `Punct` is an single punctuation character like `+`, `-` or `#`.
769+ /// A `Punct` is a single punctuation character such as `+`, `-` or `#`.
770770///
771771/// Multi-character operators like `+=` are represented as two instances of `Punct` with different
772772/// forms of `Spacing` returned.
@@ -779,16 +779,19 @@ impl !Send for Punct {}
779779#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
780780impl !Sync for Punct { }
781781
782- /// Whether an `Punct` is followed immediately by another `Punct` or
783- /// followed by another token or whitespace.
782+ /// Describes whether a `Punct` is followed immediately by another `Punct` ([`Spacing::Joint`]) or
783+ /// by a different token or whitespace ([`Spacing::Alone`]) .
784784#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
785785#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
786786pub enum Spacing {
787- /// e.g., `+` is `Alone` in `+ =`, `+ident` or `+()`.
787+ /// A `Punct` is not immediately followed by another `Punct`.
788+ /// E.g. `+` is `Alone` in `+ =`, `+ident` and `+()`.
788789 #[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
789790 Alone ,
790- /// e.g., `+` is `Joint` in `+=` or `'#`.
791- /// Additionally, single quote `'` can join with identifiers to form lifetimes `'ident`.
791+ /// A `Punct` is immediately followed by another `Punct`.
792+ /// E.g. `+` is `Joint` in `+=` and `++`.
793+ ///
794+ /// Additionally, single quote `'` can join with identifiers to form lifetimes: `'ident`.
792795 #[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
793796 Joint ,
794797}
0 commit comments