2019-07-31 07:04:00 -05:00
|
|
|
From a25405f1fc4a168c9c370524be48aff8c8ebc529 Mon Sep 17 00:00:00 2001
|
|
|
|
From: bjorn3 <bjorn3@users.noreply.github.com>
|
|
|
|
Date: Wed, 12 Jun 2019 18:07:23 +0200
|
|
|
|
Subject: [PATCH] Fix libtest compilation
|
|
|
|
|
|
|
|
---
|
|
|
|
src/libtest/lib.rs | 11 +++++------
|
|
|
|
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
|
|
|
|
index 810a98e..4fdde0e 100644
|
|
|
|
--- a/src/libtest/lib.rs
|
|
|
|
+++ b/src/libtest/lib.rs
|
2019-09-28 04:13:40 -05:00
|
|
|
@@ -1441,12 +1441,12 @@ pub fn run_test(
|
2019-07-31 07:04:00 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
- fn run_test_inner(
|
|
|
|
+ fn run_test_inner<F: FnOnce() + Send + 'static>(
|
|
|
|
desc: TestDesc,
|
|
|
|
monitor_ch: Sender<MonitorMsg>,
|
|
|
|
nocapture: bool,
|
2019-09-28 04:13:40 -05:00
|
|
|
report_time: bool,
|
2019-07-31 07:04:00 -05:00
|
|
|
- testfn: Box<dyn FnOnce() + Send>,
|
|
|
|
+ testfn: F,
|
|
|
|
concurrency: Concurrent,
|
|
|
|
) {
|
|
|
|
// Buffer for capturing standard I/O
|
2019-09-28 04:13:40 -05:00
|
|
|
@@ -1500,23 +1500,15 @@ pub fn run_test(
|
2019-07-31 07:04:00 -05:00
|
|
|
(benchfn.clone())(harness)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
- DynTestFn(f) => {
|
|
|
|
- let cb = move || __rust_begin_short_backtrace(f);
|
2019-09-28 04:13:40 -05:00
|
|
|
- run_test_inner(
|
|
|
|
- desc,
|
|
|
|
- monitor_ch,
|
|
|
|
- opts.nocapture,
|
|
|
|
- opts.report_time,
|
|
|
|
- Box::new(cb),
|
|
|
|
- concurrency,
|
|
|
|
- )
|
2019-07-31 07:04:00 -05:00
|
|
|
+ DynTestFn(_f) => {
|
|
|
|
+ unimplemented!();
|
|
|
|
}
|
|
|
|
StaticTestFn(f) => run_test_inner(
|
|
|
|
desc,
|
|
|
|
monitor_ch,
|
|
|
|
opts.nocapture,
|
2019-09-28 04:13:40 -05:00
|
|
|
opts.report_time,
|
2019-07-31 07:04:00 -05:00
|
|
|
- Box::new(move || __rust_begin_short_backtrace(f)),
|
|
|
|
+ move || __rust_begin_short_backtrace(f),
|
|
|
|
concurrency,
|
|
|
|
),
|
|
|
|
}
|
|
|
|
--
|
|
|
|
2.11.0
|