diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2019-05-24 07:51:48 +0200 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2019-05-24 07:51:48 +0200 |
| commit | a8fc09be39fd265bcd20b66043a2142c25bfc22e (patch) | |
| tree | 38c1c7589d3a40de0a741d721b122cda1db84dee /src/libtest | |
| parent | fd8e23c6b2902299cb76e89d868fbb84f48035ab (diff) | |
| download | rust-a8fc09be39fd265bcd20b66043a2142c25bfc22e.tar.gz rust-a8fc09be39fd265bcd20b66043a2142c25bfc22e.zip | |
Use FnOnce instead of FnBox in libtest
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 7f7db2a2125..8bd0d74cd17 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -22,7 +22,6 @@ #![unstable(feature = "test", issue = "27812")] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] #![feature(asm)] -#![feature(fnbox)] #![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc, rustc_private))] #![feature(nll)] #![feature(set_stdio)] @@ -56,7 +55,6 @@ pub use self::TestResult::*; use std::any::Any; use std::borrow::Cow; -use std::boxed::FnBox; use std::cmp; use std::collections::BTreeMap; use std::env; @@ -174,7 +172,7 @@ pub trait TDynBenchFn: Send { pub enum TestFn { StaticTestFn(fn()), StaticBenchFn(fn(&mut Bencher)), - DynTestFn(Box<dyn FnBox() + Send>), + DynTestFn(Box<dyn FnOnce() + Send>), DynBenchFn(Box<dyn TDynBenchFn + 'static>), } @@ -1447,7 +1445,7 @@ pub fn run_test( desc: TestDesc, monitor_ch: Sender<MonitorMsg>, nocapture: bool, - testfn: Box<dyn FnBox() + Send>, + testfn: Box<dyn FnOnce() + Send>, concurrency: Concurrent, ) { // Buffer for capturing standard I/O |
