@@ -86,12 +86,12 @@ impl TokenTree {
86
86
}
87
87
}
88
88
89
- // Create a `TokenTree::Token` with alone spacing.
89
+ /// Create a `TokenTree::Token` with alone spacing.
90
90
pub fn token_alone ( kind : TokenKind , span : Span ) -> TokenTree {
91
91
TokenTree :: Token ( Token :: new ( kind, span) , Spacing :: Alone )
92
92
}
93
93
94
- // Create a `TokenTree::Token` with joint spacing.
94
+ /// Create a `TokenTree::Token` with joint spacing.
95
95
pub fn token_joint ( kind : TokenKind , span : Span ) -> TokenTree {
96
96
TokenTree :: Token ( Token :: new ( kind, span) , Spacing :: Joint )
97
97
}
@@ -413,17 +413,17 @@ impl TokenStream {
413
413
TokenStream ( Lrc :: new ( self . 0 . iter ( ) . enumerate ( ) . map ( |( i, tree) | f ( i, tree) ) . collect ( ) ) )
414
414
}
415
415
416
- // Create a token stream containing a single token with alone spacing.
416
+ /// Create a token stream containing a single token with alone spacing.
417
417
pub fn token_alone ( kind : TokenKind , span : Span ) -> TokenStream {
418
418
TokenStream :: new ( vec ! [ TokenTree :: token_alone( kind, span) ] )
419
419
}
420
420
421
- // Create a token stream containing a single token with joint spacing.
421
+ /// Create a token stream containing a single token with joint spacing.
422
422
pub fn token_joint ( kind : TokenKind , span : Span ) -> TokenStream {
423
423
TokenStream :: new ( vec ! [ TokenTree :: token_joint( kind, span) ] )
424
424
}
425
425
426
- // Create a token stream containing a single `Delimited`.
426
+ /// Create a token stream containing a single `Delimited`.
427
427
pub fn delimited ( span : DelimSpan , delim : Delimiter , tts : TokenStream ) -> TokenStream {
428
428
TokenStream :: new ( vec ! [ TokenTree :: Delimited ( span, delim, tts) ] )
429
429
}
@@ -522,8 +522,8 @@ impl TokenStream {
522
522
}
523
523
}
524
524
525
- // Push `tt` onto the end of the stream, possibly gluing it to the last
526
- // token. Uses `make_mut` to maximize efficiency.
525
+ /// Push `tt` onto the end of the stream, possibly gluing it to the last
526
+ /// token. Uses `make_mut` to maximize efficiency.
527
527
pub fn push_tree ( & mut self , tt : TokenTree ) {
528
528
let vec_mut = Lrc :: make_mut ( & mut self . 0 ) ;
529
529
@@ -534,9 +534,9 @@ impl TokenStream {
534
534
}
535
535
}
536
536
537
- // Push `stream` onto the end of the stream, possibly gluing the first
538
- // token tree to the last token. (No other token trees will be glued.)
539
- // Uses `make_mut` to maximize efficiency.
537
+ /// Push `stream` onto the end of the stream, possibly gluing the first
538
+ /// token tree to the last token. (No other token trees will be glued.)
539
+ /// Uses `make_mut` to maximize efficiency.
540
540
pub fn push_stream ( & mut self , stream : TokenStream ) {
541
541
let vec_mut = Lrc :: make_mut ( & mut self . 0 ) ;
542
542
0 commit comments