@@ -766,7 +766,7 @@ impl fmt::Debug for Group {
766
766
}
767
767
}
768
768
769
- /// An `Punct` is an single punctuation character like `+`, `-` or `#`.
769
+ /// A `Punct` is a single punctuation character such as `+`, `-` or `#`.
770
770
///
771
771
/// Multi-character operators like `+=` are represented as two instances of `Punct` with different
772
772
/// forms of `Spacing` returned.
@@ -779,16 +779,19 @@ impl !Send for Punct {}
779
779
#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
780
780
impl !Sync for Punct { }
781
781
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`]) .
784
784
#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
785
785
#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
786
786
pub 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 `+()`.
788
789
#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
789
790
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`.
792
795
#[ stable( feature = "proc_macro_lib2" , since = "1.29.0" ) ]
793
796
Joint ,
794
797
}
0 commit comments