Use a span from the correct file for the inner span of a module
This basically only affects modules which are empty (or only contain comments). Closes #26755
This commit is contained in:
@@ -231,6 +231,7 @@ impl<'a> StringReader<'a> {
|
||||
None => {
|
||||
if self.is_eof() {
|
||||
self.peek_tok = token::Eof;
|
||||
self.peek_span = codemap::mk_sp(self.filemap.end_pos, self.filemap.end_pos);
|
||||
} else {
|
||||
let start_bytepos = self.last_pos;
|
||||
self.peek_tok = self.next_token_inner();
|
||||
|
||||
Reference in New Issue
Block a user