File tree 1 file changed +3
-3
lines changed
src/libsyntax/parse/lexer
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> {
304
304
if !is_line_non_doc_comment ( string) {
305
305
Some ( TokenAndSpan {
306
306
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 )
308
308
} )
309
309
} else {
310
310
None
@@ -358,7 +358,7 @@ impl<'a> StringReader<'a> {
358
358
fn consume_block_comment ( & mut self ) -> Option < TokenAndSpan > {
359
359
// block comments starting with "/**" or "/*!" are doc-comments
360
360
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 ) ;
362
362
363
363
let mut level: int = 1 ;
364
364
while level > 0 {
@@ -389,7 +389,7 @@ impl<'a> StringReader<'a> {
389
389
if !is_block_non_doc_comment ( string) {
390
390
Some ( TokenAndSpan {
391
391
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 )
393
393
} )
394
394
} else {
395
395
None
You can’t perform that action at this time.
0 commit comments