Skip to content

Commit a8fc09b

Browse files
committed
Use FnOnce instead of FnBox in libtest
1 parent fd8e23c commit a8fc09b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/libtest/lib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#![unstable(feature = "test", issue = "27812")]
2323
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
2424
#![feature(asm)]
25-
#![feature(fnbox)]
2625
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc, rustc_private))]
2726
#![feature(nll)]
2827
#![feature(set_stdio)]
@@ -56,7 +55,6 @@ pub use self::TestResult::*;
5655

5756
use std::any::Any;
5857
use std::borrow::Cow;
59-
use std::boxed::FnBox;
6058
use std::cmp;
6159
use std::collections::BTreeMap;
6260
use std::env;
@@ -174,7 +172,7 @@ pub trait TDynBenchFn: Send {
174172
pub enum TestFn {
175173
StaticTestFn(fn()),
176174
StaticBenchFn(fn(&mut Bencher)),
177-
DynTestFn(Box<dyn FnBox() + Send>),
175+
DynTestFn(Box<dyn FnOnce() + Send>),
178176
DynBenchFn(Box<dyn TDynBenchFn + 'static>),
179177
}
180178

@@ -1447,7 +1445,7 @@ pub fn run_test(
14471445
desc: TestDesc,
14481446
monitor_ch: Sender<MonitorMsg>,
14491447
nocapture: bool,
1450-
testfn: Box<dyn FnBox() + Send>,
1448+
testfn: Box<dyn FnOnce() + Send>,
14511449
concurrency: Concurrent,
14521450
) {
14531451
// Buffer for capturing standard I/O

0 commit comments

Comments
 (0)