@@ -478,8 +478,8 @@ impl SpanlessEq for TokenKind {
478
478
479
479
impl SpanlessEq for TokenStream {
480
480
fn eq ( & self , other : & Self ) -> bool {
481
- let mut this_trees = self . trees_ref ( ) ;
482
- let mut other_trees = other. trees_ref ( ) ;
481
+ let mut this_trees = self . trees ( ) ;
482
+ let mut other_trees = other. trees ( ) ;
483
483
loop {
484
484
let this = match this_trees. next ( ) {
485
485
None => return other_trees. next ( ) . is_none ( ) ,
@@ -489,7 +489,7 @@ impl SpanlessEq for TokenStream {
489
489
None => return false ,
490
490
Some ( tree) => tree,
491
491
} ;
492
- if SpanlessEq :: eq ( this, other) {
492
+ if SpanlessEq :: eq ( & this, & other) {
493
493
continue ;
494
494
}
495
495
if let ( TokenTree :: Token ( this) , TokenTree :: Token ( other) ) = ( this, other) {
@@ -516,7 +516,7 @@ impl SpanlessEq for TokenStream {
516
516
fn doc_comment < ' a > (
517
517
style : AttrStyle ,
518
518
unescaped : Symbol ,
519
- trees : & mut impl Iterator < Item = & ' a TokenTree > ,
519
+ trees : & mut impl Iterator < Item = TokenTree > ,
520
520
) -> bool {
521
521
if match style {
522
522
AttrStyle :: Outer => false ,
@@ -534,12 +534,12 @@ fn doc_comment<'a>(
534
534
Some ( TokenTree :: Delimited ( _span, DelimToken :: Bracket , stream) ) => stream,
535
535
_ => return false ,
536
536
} ;
537
- let mut trees = stream. trees_ref ( ) ;
537
+ let mut trees = stream. trees ( ) ;
538
538
match trees. next ( ) {
539
539
Some ( TokenTree :: Token ( Token {
540
540
kind : TokenKind :: Ident ( symbol, false ) ,
541
541
span : _,
542
- } ) ) if * symbol == sym:: doc => { }
542
+ } ) ) if symbol == sym:: doc => { }
543
543
_ => return false ,
544
544
}
545
545
match trees. next ( ) {
@@ -551,7 +551,7 @@ fn doc_comment<'a>(
551
551
}
552
552
match trees. next ( ) {
553
553
Some ( TokenTree :: Token ( token) ) => {
554
- is_escaped_literal ( token, unescaped) && trees. next ( ) . is_none ( )
554
+ is_escaped_literal ( & token, unescaped) && trees. next ( ) . is_none ( )
555
555
}
556
556
_ => false ,
557
557
}
0 commit comments