Skip to content

Commit ecda26e

Browse files
Merge #3382
3382: Rustup to rustc 1.31.0-nightly (fb2446a 2018-10-30) r=Manishearth a=Manishearth Fixes breakage caused by rust-lang/rust#55190 Co-authored-by: Manish Goregaokar <[email protected]>
2 parents 3971c42 + a06296f commit ecda26e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/utils/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ pub fn snippet_block<'a, 'b, T: LintContext<'b>>(cx: &T, span: Span, default: &'
392392
pub fn last_line_of_span<'a, T: LintContext<'a>>(cx: &T, span: Span) -> Span {
393393
let file_map_and_line = cx.sess().source_map().lookup_line(span.lo()).unwrap();
394394
let line_no = file_map_and_line.line;
395-
let line_start = &file_map_and_line.fm.lines[line_no];
395+
let line_start = &file_map_and_line.sf.lines[line_no];
396396
Span::new(*line_start, span.hi(), span.ctxt())
397397
}
398398

clippy_lints/src/utils/sugg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ impl<'a, 'b, 'c, T: LintContext<'c>> DiagnosticBuilderExt<'c, T> for rustc_error
548548
let hi = cx.sess().source_map().next_point(remove_span).hi();
549549
let fmpos = cx.sess().source_map().lookup_byte_offset(hi);
550550

551-
if let Some(ref src) = fmpos.fm.src {
551+
if let Some(ref src) = fmpos.sf.src {
552552
let non_whitespace_offset = src[fmpos.pos.to_usize()..].find(|c| c != ' ' && c != '\t' && c != '\n');
553553

554554
if let Some(non_whitespace_offset) = non_whitespace_offset {

0 commit comments

Comments
 (0)