diff options
Diffstat (limited to 'src/librustc_errors/emitter.rs')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 0bd9b7268cb..33fce7b1968 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -16,10 +16,10 @@ use {Level, CodeSuggestion, DiagnosticBuilder, SubDiagnostic, CodeMapper, Diagno use snippet::{Annotation, AnnotationType, Line, MultilineAnnotation, StyledString, Style}; use styled_buffer::StyledBuffer; +use rustc_data_structures::sync::Lrc; use std::borrow::Cow; use std::io::prelude::*; use std::io; -use std::rc::Rc; use term; use std::collections::{HashMap, HashSet}; use std::cmp::min; @@ -106,7 +106,7 @@ impl ColorConfig { pub struct EmitterWriter { dst: Destination, - cm: Option<Rc<CodeMapper>>, + cm: Option<Lrc<CodeMapper>>, short_message: bool, teach: bool, error_codes: HashSet<String>, @@ -114,7 +114,7 @@ pub struct EmitterWriter { } struct FileWithAnnotatedLines { - file: Rc<FileMap>, + file: Lrc<FileMap>, lines: Vec<Line>, multiline_depth: usize, } @@ -148,7 +148,7 @@ impl Drop for EmitterWriter { impl EmitterWriter { pub fn stderr(color_config: ColorConfig, - code_map: Option<Rc<CodeMapper>>, + code_map: Option<Lrc<CodeMapper>>, short_message: bool, teach: bool) -> EmitterWriter { @@ -175,7 +175,7 @@ impl EmitterWriter { } pub fn new(dst: Box<Write + Send>, - code_map: Option<Rc<CodeMapper>>, + code_map: Option<Lrc<CodeMapper>>, short_message: bool, teach: bool) -> EmitterWriter { @@ -204,7 +204,7 @@ impl EmitterWriter { fn preprocess_annotations(&mut self, msp: &MultiSpan) -> Vec<FileWithAnnotatedLines> { fn add_annotation_to_file(file_vec: &mut Vec<FileWithAnnotatedLines>, - file: Rc<FileMap>, + file: Lrc<FileMap>, line_index: usize, ann: Annotation) { @@ -336,7 +336,7 @@ impl EmitterWriter { fn render_source_line(&self, buffer: &mut StyledBuffer, - file: Rc<FileMap>, + file: Lrc<FileMap>, line: &Line, width_offset: usize, code_offset: usize) -> Vec<(usize, Style)> { |
