From d6dcbcd4e11a1b787a9db1fa43a49907e8bccecf Mon Sep 17 00:00:00 2001 From: Donato Sciarra Date: Sat, 18 Aug 2018 12:13:52 +0200 Subject: mv FileMap SourceFile --- src/librustc_errors/emitter.rs | 8 ++++---- src/librustc_errors/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/librustc_errors') diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 0a3e4d3ad25..ce3a19677f2 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -10,7 +10,7 @@ use self::Destination::*; -use syntax_pos::{FileMap, Span, MultiSpan}; +use syntax_pos::{SourceFile, Span, MultiSpan}; use {Level, CodeSuggestion, DiagnosticBuilder, SubDiagnostic, SourceMapperDyn, DiagnosticId}; use snippet::{Annotation, AnnotationType, Line, MultilineAnnotation, StyledString, Style}; @@ -127,7 +127,7 @@ pub struct EmitterWriter { } struct FileWithAnnotatedLines { - file: Lrc, + file: Lrc, lines: Vec, multiline_depth: usize, } @@ -177,7 +177,7 @@ impl EmitterWriter { fn preprocess_annotations(&mut self, msp: &MultiSpan) -> Vec { fn add_annotation_to_file(file_vec: &mut Vec, - file: Lrc, + file: Lrc, line_index: usize, ann: Annotation) { @@ -307,7 +307,7 @@ impl EmitterWriter { fn render_source_line(&self, buffer: &mut StyledBuffer, - file: Lrc, + file: Lrc, line: &Line, width_offset: usize, code_offset: usize) -> Vec<(usize, Style)> { diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 40d7a122d30..597b3216490 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -55,7 +55,7 @@ pub mod registry; mod styled_buffer; mod lock; -use syntax_pos::{BytePos, Loc, FileLinesResult, FileMap, FileName, MultiSpan, Span, NO_EXPANSION}; +use syntax_pos::{BytePos, Loc, FileLinesResult, SourceFile, FileName, MultiSpan, Span, NO_EXPANSION}; #[derive(Copy, Clone, Debug, PartialEq, Hash, RustcEncodable, RustcDecodable)] pub enum Applicability { @@ -120,7 +120,7 @@ pub trait SourceMapper { fn span_to_filename(&self, sp: Span) -> FileName; fn merge_spans(&self, sp_lhs: Span, sp_rhs: Span) -> Option; fn call_span_if_macro(&self, sp: Span) -> Span; - fn ensure_filemap_source_present(&self, file_map: Lrc) -> bool; + fn ensure_filemap_source_present(&self, file_map: Lrc) -> bool; fn doctest_offset_line(&self, line: usize) -> usize; } -- cgit 1.4.1-3-g733a5