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 @@ -631,26 +631,14 @@ impl<'a> StringReader<'a> {
631
631
self . bump ( ) ;
632
632
}
633
633
634
- if doc_comment {
634
+ let tok = if doc_comment {
635
635
self . with_str_from ( start_bpos, |string| {
636
- // comments with only more "/"s are not doc comments
637
- let tok = if is_doc_comment ( string) {
638
- token:: DocComment ( Symbol :: intern ( string) )
639
- } else {
640
- token:: Comment
641
- } ;
642
-
643
- Some ( TokenAndSpan {
644
- tok,
645
- sp : self . mk_sp ( start_bpos, self . pos ) ,
646
- } )
636
+ token:: DocComment ( Symbol :: intern ( string) )
647
637
} )
648
638
} else {
649
- Some ( TokenAndSpan {
650
- tok : token:: Comment ,
651
- sp : self . mk_sp ( start_bpos, self . pos ) ,
652
- } )
653
- }
639
+ token:: Comment
640
+ } ;
641
+ Some ( TokenAndSpan { tok, sp : self . mk_sp ( start_bpos, self . pos ) } )
654
642
}
655
643
Some ( '*' ) => {
656
644
self . bump ( ) ;
You can’t perform that action at this time.
0 commit comments