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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user