Implement a file-path remapping feature in support of debuginfo and reproducible builds.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use codemap::CodeMap;
|
||||
use codemap::{CodeMap, FilePathMapping};
|
||||
use errors::Handler;
|
||||
use errors::emitter::EmitterWriter;
|
||||
use std::io;
|
||||
@@ -47,8 +47,8 @@ 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());
|
||||
code_map.new_filemap_and_lines("test.rs", None, &file_text);
|
||||
let code_map = Rc::new(CodeMap::new(FilePathMapping::empty()));
|
||||
code_map.new_filemap_and_lines("test.rs", &file_text);
|
||||
|
||||
let primary_span = make_span(&file_text, &span_labels[0].start, &span_labels[0].end);
|
||||
let mut msp = MultiSpan::from_span(primary_span);
|
||||
|
||||
Reference in New Issue
Block a user