]> git.lizzy.rs Git - rust.git/blobdiff - src/compiletest/util.rs
auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis
[rust.git] / src / compiletest / util.rs
index e0afd57adf04bf91efab8a2b5fa869424f3c20e7..445e814a1eb04fddb83b39e1bb54c3ef80a8eea7 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use common::config;
+use common::Config;
 
 #[cfg(target_os = "win32")]
 use std::os::getenv;
@@ -21,6 +21,7 @@
     ("android", "android"),
     ("linux", "linux"),
     ("freebsd", "freebsd"),
+    ("dragonfly", "dragonfly"),
 ];
 
 pub fn get_os(triple: &str) -> &'static str {
@@ -33,7 +34,7 @@ pub fn get_os(triple: &str) -> &'static str {
 }
 
 #[cfg(target_os = "win32")]
-pub fn make_new_path(path: &str) -> ~str {
+pub fn make_new_path(path: &str) -> String {
 
     // Windows just uses PATH as the library search path, so we have to
     // maintain the current value while adding our own
@@ -41,17 +42,17 @@ pub fn make_new_path(path: &str) -> ~str {
       Some(curr) => {
         format!("{}{}{}", path, path_div(), curr)
       }
-      None => path.to_str()
+      None => path.to_string()
     }
 }
 
 #[cfg(target_os = "win32")]
-pub fn lib_path_env_var() -> ~str { "PATH".to_owned() }
+pub fn lib_path_env_var() -> &'static str { "PATH" }
 
 #[cfg(target_os = "win32")]
-pub fn path_div() -> ~str { ";".to_owned() }
+pub fn path_div() -> &'static str { ";" }
 
-pub fn logv(config: &config, s: ~str) {
+pub fn logv(config: &Config, s: String) {
     debug!("{}", s);
     if config.verbose { println!("{}", s); }
 }