File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
compiler/rustc_parse/src/lexer Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -172,17 +172,17 @@ impl<'a> StringReader<'a> {
172172 )
173173 . emit ( ) ;
174174 FatalError . raise ( ) ;
175+ } else {
176+ // Skip non-doc comments
177+ let doc_style = doc_style?;
178+
179+ // Opening delimiter of the length 3 and closing delimiter of the length 2
180+ // are not included into the symbol.
181+ let content_start = start + BytePos ( 3 ) ;
182+ let content_end = self . pos - BytePos ( 2 ) ;
183+ let content = self . str_from_to ( content_start, content_end) ;
184+ self . cook_doc_comment ( content_start, content, CommentKind :: Block , doc_style)
175185 }
176-
177- // Skip non-doc comments
178- let doc_style = doc_style?;
179-
180- // Opening delimiter of the length 3 and closing delimiter of the length 2
181- // are not included into the symbol.
182- let content_start = start + BytePos ( 3 ) ;
183- let content_end = self . pos - BytePos ( if terminated { 2 } else { 0 } ) ;
184- let content = self . str_from_to ( content_start, content_end) ;
185- self . cook_doc_comment ( content_start, content, CommentKind :: Block , doc_style)
186186 }
187187 rustc_lexer:: TokenKind :: Whitespace => return None ,
188188 rustc_lexer:: TokenKind :: Ident | rustc_lexer:: TokenKind :: RawIdent => {
You can’t perform that action at this time.
0 commit comments