Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s/file_map/source_map #3447

merged 1 commit into from Nov 22, 2018
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions clippy_lints/src/utils/
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