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:
Nick Cameron 2015-07-06 14:13:19 +12:00
parent bf34187a2f
commit f47d20aecd
5 changed files with 29 additions and 13 deletions

View file

@ -894,7 +894,7 @@ impl CodeMap {
FileMapAndBytePos {fm: fm, pos: offset}
}
/// Converts an absolute BytePos to a CharPos relative to the filemap and above.
/// Converts an absolute BytePos to a CharPos relative to the filemap.
pub fn bytepos_to_file_charpos(&self, bpos: BytePos) -> CharPos {
let idx = self.lookup_filemap_idx(bpos);
let files = self.files.borrow();