diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiletest/compiletest.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 5e3c38d01eb..0fb75b7c8e0 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -325,19 +325,17 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName { } pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn { - use std::cell::Cell; - let config = Cell::new((*config).clone()); + let config = (*config).clone(); // FIXME (#9639): This needs to handle non-utf8 paths - let testfile = Cell::new(testfile.as_str().unwrap().to_owned()); - test::DynTestFn(proc() { runtest::run(config.take(), testfile.take()) }) + let testfile = testfile.as_str().unwrap().to_owned(); + test::DynTestFn(proc() { runtest::run(config, testfile) }) } pub fn make_metrics_test_closure(config: &config, testfile: &Path) -> test::TestFn { - use std::cell::Cell; - let config = Cell::new((*config).clone()); + let config = (*config).clone(); // FIXME (#9639): This needs to handle non-utf8 paths - let testfile = Cell::new(testfile.as_str().unwrap().to_owned()); + let testfile = testfile.as_str().unwrap().to_owned(); test::DynMetricFn(proc(mm) { - runtest::run_metrics(config.take(), testfile.take(), mm) + runtest::run_metrics(config, testfile, mm) }) } |
