Skip to content

Commit

Permalink
Merge pull request #3447 from phansch/small_rename
Browse files Browse the repository at this point in the history
s/file_map/source_map
  • Loading branch information
oli-obk committed Nov 22, 2018
2 parents 2f6881c + c4b08a5 commit ff7da32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ pub fn snippet_block<'a, 'b, T: LintContext<'b>>(cx: &T, span: Span, default: &'

/// Returns a new Span that covers the full last line of the given Span
pub fn last_line_of_span<'a, T: LintContext<'a>>(cx: &T, span: Span) -> Span {
let file_map_and_line = cx.sess().source_map().lookup_line(span.lo()).unwrap();
let line_no = file_map_and_line.line;
let line_start = &file_map_and_line.sf.lines[line_no];
let source_map_and_line = cx.sess().source_map().lookup_line(span.lo()).unwrap();
let line_no = source_map_and_line.line;
let line_start = &source_map_and_line.sf.lines[line_no];
Span::new(*line_start, span.hi(), span.ctxt())
}

Expand Down

0 comments on commit ff7da32

Please sign in to comment.