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 @@ -631,26 +631,14 @@ impl<'a> StringReader<'a> {
631631 self . bump ( ) ;
632632 }
633633
634- if doc_comment {
634+ let tok = if doc_comment {
635635 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) )
647637 } )
648638 } 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 ) } )
654642 }
655643 Some ( '*' ) => {
656644 self . bump ( ) ;
You can’t perform that action at this time.
0 commit comments