about summary refs log tree commit diff
path: root/src/libsyntax/test_snippet.rs
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-12-14 08:09:19 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-12-14 11:22:08 +0100
commitd732da813bac73d2c81caddd06df3df3d9609e3d (patch)
treecd0e25895e11c8c70e296b98de5fc8a16073c324 /src/libsyntax/test_snippet.rs
parent8954b16beb844fcac0cefe229e1c714a17de16e5 (diff)
downloadrust-d732da813bac73d2c81caddd06df3df3d9609e3d.tar.gz
rust-d732da813bac73d2c81caddd06df3df3d9609e3d.zip
Use PathBuf instead of String where applicable
Diffstat (limited to 'src/libsyntax/test_snippet.rs')
-rw-r--r--src/libsyntax/test_snippet.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/test_snippet.rs b/src/libsyntax/test_snippet.rs
index a29250ea5f1..5072f2e2793 100644
--- a/src/libsyntax/test_snippet.rs
+++ b/src/libsyntax/test_snippet.rs
@@ -16,6 +16,7 @@ use std::io::prelude::*;
 use std::rc::Rc;
 use std::str;
 use std::sync::{Arc, Mutex};
+use std::path::Path;
 use syntax_pos::{BytePos, NO_EXPANSION, Span, MultiSpan};
 
 /// Identify a position in the text by the Nth occurrence of a string.
@@ -48,7 +49,7 @@ fn test_harness(file_text: &str, span_labels: Vec<SpanLabel>, expected_output: &
     let output = Arc::new(Mutex::new(Vec::new()));
 
     let code_map = Rc::new(CodeMap::new(FilePathMapping::empty()));
-    code_map.new_filemap_and_lines("test.rs", &file_text);
+    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);
     let mut msp = MultiSpan::from_span(primary_span);