File tree 1 file changed +5
-17
lines changed
src/libsyntax/parse/lexer
1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -630,26 +630,14 @@ impl<'a> StringReader<'a> {
630
630
self . bump ( ) ;
631
631
}
632
632
633
- if doc_comment {
633
+ let tok = if doc_comment {
634
634
self . with_str_from ( start_bpos, |string| {
635
- // comments with only more "/"s are not doc comments
636
- let tok = if is_doc_comment ( string) {
637
- token:: DocComment ( Symbol :: intern ( string) )
638
- } else {
639
- token:: Comment
640
- } ;
641
-
642
- Some ( TokenAndSpan {
643
- tok,
644
- sp : self . mk_sp ( start_bpos, self . pos ) ,
645
- } )
635
+ token:: DocComment ( Symbol :: intern ( string) )
646
636
} )
647
637
} else {
648
- Some ( TokenAndSpan {
649
- tok : token:: Comment ,
650
- sp : self . mk_sp ( start_bpos, self . pos ) ,
651
- } )
652
- }
638
+ token:: Comment
639
+ } ;
640
+ Some ( TokenAndSpan { tok, sp : self . mk_sp ( start_bpos, self . pos ) } )
653
641
}
654
642
Some ( '*' ) => {
655
643
self . bump ( ) ;
You can’t perform that action at this time.
0 commit comments