about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-04 16:29:01 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-12-10 15:13:12 -0800
commitfdd6750570cf1434264a601fd2b749d7fe01dee8 (patch)
tree6f07a66dfd56306ab6a9a9feb3b8fb2f2441b0c5 /src
parentf08f3a757643aa16b05ec7dee73ecff216354ddf (diff)
downloadrust-fdd6750570cf1434264a601fd2b749d7fe01dee8.tar.gz
rust-fdd6750570cf1434264a601fd2b749d7fe01dee8.zip
compiletest: Remove uses of `Cell`.
Diffstat (limited to 'src')
-rw-r--r--src/compiletest/compiletest.rs14
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)
     })
 }