diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-06-10 19:33:04 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-06-17 09:07:17 -0700 |
| commit | b4a2823cd6c6f1a560469587f902f3a1f49d3c79 (patch) | |
| tree | 162e8021fd73ffc7dfe0798dc99097138343977a /src/libtest | |
| parent | aa931e9c6f92557b99978f1cc562c99051190f79 (diff) | |
| download | rust-b4a2823cd6c6f1a560469587f902f3a1f49d3c79.tar.gz rust-b4a2823cd6c6f1a560469587f902f3a1f49d3c79.zip | |
More test fixes and fallout of stability changes
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 1507226c3a1..f800b4863c6 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -46,7 +46,6 @@ #![feature(set_stdio)] #![feature(slice_extras)] #![feature(staged_api)] -#![feature(thunk)] extern crate getopts; extern crate serialize; @@ -82,7 +81,6 @@ use std::path::PathBuf; use std::sync::mpsc::{channel, Sender}; use std::sync::{Arc, Mutex}; use std::thread; -use std::thunk::Thunk; use std::time::Duration; // to be used by rustc to compile tests in libtest @@ -155,7 +153,7 @@ pub enum TestFn { StaticTestFn(fn()), StaticBenchFn(fn(&mut Bencher)), StaticMetricFn(fn(&mut MetricMap)), - DynTestFn(Thunk<'static>), + DynTestFn(Box<FnBox() + Send>), DynMetricFn(Box<FnBox(&mut MetricMap)+Send>), DynBenchFn(Box<TDynBenchFn+'static>) } @@ -961,7 +959,7 @@ pub fn run_test(opts: &TestOpts, fn run_test_inner(desc: TestDesc, monitor_ch: Sender<MonitorMsg>, nocapture: bool, - testfn: Thunk<'static>) { + testfn: Box<FnBox() + Send>) { struct Sink(Arc<Mutex<Vec<u8>>>); impl Write for Sink { fn write(&mut self, data: &[u8]) -> io::Result<usize> { @@ -1229,7 +1227,6 @@ mod tests { TestDesc, TestDescAndFn, TestOpts, run_test, MetricMap, StaticTestName, DynTestName, DynTestFn, ShouldPanic}; - use std::thunk::Thunk; use std::sync::mpsc::channel; #[test] |
