File tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed
src/libsyntax/parse/lexer Expand file tree Collapse file tree 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> {
630630 self . bump ( ) ;
631631 }
632632
633- if doc_comment {
633+ let tok = if doc_comment {
634634 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) )
646636 } )
647637 } 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 ) } )
653641 }
654642 Some ( '*' ) => {
655643 self . bump ( ) ;
You can’t perform that action at this time.
0 commit comments