Auto merge of #46381 - estebank:expected-span, r=nikomatsakis

Point to next token when it is in the expected line

r? @nikomatsakis
This commit is contained in:
bors 2017-12-02 20:06:42 +00:00
commit f9b0897c5d
4 changed files with 26 additions and 15 deletions

View file

@ -358,7 +358,7 @@ impl CodeMap {
}
// If the relevant filemap is empty, we don't return a line number.
fn lookup_line(&self, pos: BytePos) -> Result<FileMapAndLine, Rc<FileMap>> {
pub fn lookup_line(&self, pos: BytePos) -> Result<FileMapAndLine, Rc<FileMap>> {
let idx = self.lookup_filemap_idx(pos);
let files = self.files.borrow();