1
Fork 0

mv FileMap SourceFile

This commit is contained in:
Donato Sciarra 2018-08-18 12:13:52 +02:00
parent c655473378
commit d6dcbcd4e1
22 changed files with 126 additions and 126 deletions

View file

@ -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<FileMap>,
file: Lrc<SourceFile>,
lines: Vec<Line>,
multiline_depth: usize,
}
@ -177,7 +177,7 @@ impl EmitterWriter {
fn preprocess_annotations(&mut self, msp: &MultiSpan) -> Vec<FileWithAnnotatedLines> {
fn add_annotation_to_file(file_vec: &mut Vec<FileWithAnnotatedLines>,
file: Lrc<FileMap>,
file: Lrc<SourceFile>,
line_index: usize,
ann: Annotation) {
@ -307,7 +307,7 @@ impl EmitterWriter {
fn render_source_line(&self,
buffer: &mut StyledBuffer,
file: Lrc<FileMap>,
file: Lrc<SourceFile>,
line: &Line,
width_offset: usize,
code_offset: usize) -> Vec<(usize, Style)> {

View file

@ -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<Span>;
fn call_span_if_macro(&self, sp: Span) -> Span;
fn ensure_filemap_source_present(&self, file_map: Lrc<FileMap>) -> bool;
fn ensure_filemap_source_present(&self, file_map: Lrc<SourceFile>) -> bool;
fn doctest_offset_line(&self, line: usize) -> usize;
}