Replace Rc with Lrc for shared data
This commit is contained in:
@@ -13,7 +13,7 @@ use errors::Handler;
|
||||
use errors::emitter::EmitterWriter;
|
||||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use std::rc::Rc;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use std::str;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::path::Path;
|
||||
@@ -48,7 +48,7 @@ impl<T: Write> Write for Shared<T> {
|
||||
fn test_harness(file_text: &str, span_labels: Vec<SpanLabel>, expected_output: &str) {
|
||||
let output = Arc::new(Mutex::new(Vec::new()));
|
||||
|
||||
let code_map = Rc::new(CodeMap::new(FilePathMapping::empty()));
|
||||
let code_map = Lrc::new(CodeMap::new(FilePathMapping::empty()));
|
||||
code_map.new_filemap_and_lines(Path::new("test.rs"), &file_text);
|
||||
|
||||
let primary_span = make_span(&file_text, &span_labels[0].start, &span_labels[0].end);
|
||||
|
||||
Reference in New Issue
Block a user