Skip to content

Commit

Permalink
use rustc_version also to parse host in compiletest
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 10, 2018
1 parent 05f2b2e commit 419a4e5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,9 @@ fn get_host() -> String {
.output()
.expect("rustc not found for -vV")
.stdout;
let host = std::str::from_utf8(&host).expect("sysroot is not utf8");
let host = host.split("\nhost: ").nth(1).expect(
"no host: part in rustc -vV",
);
let host = host.split('\n').next().expect("no \n after host");
String::from(host)
let host = std::str::from_utf8(&host).expect("host is not utf8");
let version_meta = rustc_version::version_meta_for(&host).expect("failed to parse rustc version info");
version_meta.host
}

fn run_pass_miri(opt: bool) {
Expand Down

0 comments on commit 419a4e5

Please sign in to comment.