From a06296f8363788f75b7f295463a893bfb5743cae Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 30 Oct 2018 04:06:37 +0000 Subject: [PATCH] Rustup to rustc 1.31.0-nightly (fb2446ad5 2018-10-30) --- clippy_lints/src/utils/mod.rs | 2 +- clippy_lints/src/utils/sugg.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 72a6bda26c3..9d11950dd73 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -392,7 +392,7 @@ pub fn snippet_block<'a, 'b, T: LintContext<'b>>(cx: &T, span: Span, default: &' 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.fm.lines[line_no]; + let line_start = &file_map_and_line.sf.lines[line_no]; Span::new(*line_start, span.hi(), span.ctxt()) } diff --git a/clippy_lints/src/utils/sugg.rs b/clippy_lints/src/utils/sugg.rs index eb67838f1d1..90f48f0f83c 100644 --- a/clippy_lints/src/utils/sugg.rs +++ b/clippy_lints/src/utils/sugg.rs @@ -548,7 +548,7 @@ impl<'a, 'b, 'c, T: LintContext<'c>> DiagnosticBuilderExt<'c, T> for rustc_error let hi = cx.sess().source_map().next_point(remove_span).hi(); let fmpos = cx.sess().source_map().lookup_byte_offset(hi); - if let Some(ref src) = fmpos.fm.src { + if let Some(ref src) = fmpos.sf.src { let non_whitespace_offset = src[fmpos.pos.to_usize()..].find(|c| c != ' ' && c != '\t' && c != '\n'); if let Some(non_whitespace_offset) = non_whitespace_offset {