Merge pull request #392 from RalfJung/dirs
fix deprecation warning: use dirs crate for home_dir
This commit is contained in:
commit
ef64c25bd0
2 changed files with 4 additions and 2 deletions
|
|
@ -31,3 +31,4 @@ cargo_miri = ["cargo_metadata"]
|
|||
|
||||
[dev-dependencies]
|
||||
compiletest_rs = { version = "0.3.4", features = ["tmp"] }
|
||||
dirs = "1.0.2"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#![feature(slice_concat_ext)]
|
||||
|
||||
extern crate compiletest_rs as compiletest;
|
||||
extern crate dirs;
|
||||
|
||||
use std::slice::SliceConcatExt;
|
||||
use std::path::{PathBuf, Path};
|
||||
|
|
@ -50,7 +51,7 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: b
|
|||
// skip fullmir on nonhost
|
||||
return;
|
||||
}
|
||||
let sysroot = std::env::home_dir().unwrap()
|
||||
let sysroot = dirs::home_dir().unwrap()
|
||||
.join(".xargo")
|
||||
.join("HOST");
|
||||
flags.push(format!("--sysroot {}", sysroot.to_str().unwrap()));
|
||||
|
|
@ -110,7 +111,7 @@ fn miri_pass(path: &str, target: &str, host: &str, fullmir: bool, opt: bool) {
|
|||
// skip fullmir on nonhost
|
||||
return;
|
||||
}
|
||||
let sysroot = std::env::home_dir().unwrap()
|
||||
let sysroot = dirs::home_dir().unwrap()
|
||||
.join(".xargo")
|
||||
.join("HOST");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue