From 2ed6f1c90a1b890e8caae2707f32ea9d0c4b07fc Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 16 Jun 2016 10:54:10 +0200 Subject: [PATCH] caught by travis --- tests/compiletest.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/compiletest.rs b/tests/compiletest.rs index fd86f40637b..7a7de52992f 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -20,7 +20,7 @@ fn run_mode(dir: &'static str, mode: &'static str, sysroot: &str) { }); } -fn for_all_targets(sysroot: &str, f: F) { +fn for_all_targets(sysroot: &str, mut f: F) { for target in std::fs::read_dir(format!("{}/lib/rustlib/", sysroot)).unwrap() { let target = target.unwrap(); if !target.metadata().unwrap().is_dir() { @@ -63,7 +63,7 @@ fn compile_test() { cmd.arg(format!("--sysroot={}", sysroot)); cmd.arg("-Dwarnings"); cmd.arg(format!("--target={}", target)); - cmd.env("RUST_SYSROOT", sysroot); + cmd.env("RUST_SYSROOT", &sysroot); let libs = Path::new(&sysroot).join("lib"); let sysroot = libs.join("rustlib").join(&target).join("lib"); let paths = std::env::join_paths(&[libs, sysroot]).unwrap(); @@ -84,7 +84,7 @@ fn compile_test() { } let stderr = std::io::stderr(); writeln!(stderr.lock(), "").unwrap(); - }) + }); if failed { panic!("some tests failed"); }