File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/libsyntax/parse/lexer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ impl<'a> StringReader<'a> {
304304 if !is_line_non_doc_comment ( string) {
305305 Some ( TokenAndSpan {
306306 tok : token:: DOC_COMMENT ( str_to_ident ( string) ) ,
307- sp : codemap:: mk_sp ( start_bpos, self . pos )
307+ sp : codemap:: mk_sp ( start_bpos, self . last_pos )
308308 } )
309309 } else {
310310 None
@@ -358,7 +358,7 @@ impl<'a> StringReader<'a> {
358358 fn consume_block_comment ( & mut self ) -> Option < TokenAndSpan > {
359359 // block comments starting with "/**" or "/*!" are doc-comments
360360 let is_doc_comment = self . curr_is ( '*' ) || self . curr_is ( '!' ) ;
361- let start_bpos = self . pos - BytePos ( if is_doc_comment { 3 } else { 2 } ) ;
361+ let start_bpos = self . last_pos - BytePos ( 2 ) ;
362362
363363 let mut level: int = 1 ;
364364 while level > 0 {
@@ -389,7 +389,7 @@ impl<'a> StringReader<'a> {
389389 if !is_block_non_doc_comment ( string) {
390390 Some ( TokenAndSpan {
391391 tok : token:: DOC_COMMENT ( str_to_ident ( string) ) ,
392- sp : codemap:: mk_sp ( start_bpos, self . pos )
392+ sp : codemap:: mk_sp ( start_bpos, self . last_pos )
393393 } )
394394 } else {
395395 None
You can’t perform that action at this time.
0 commit comments