From 62ec2cb7acb1b16d0abd8a2cf40da545a13d29f3 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 2 Aug 2019 01:58:40 +0300 Subject: Remove some more `cfg(test)`s --- src/libtest/lib.rs | 22 ---------------------- src/libtest/tests.rs | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 22 deletions(-) (limited to 'src/libtest') diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index b36c5be4c07..ef66c4df99d 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -380,28 +380,6 @@ pub struct TestOpts { pub options: Options, } -impl TestOpts { - #[cfg(test)] - fn new() -> TestOpts { - TestOpts { - list: false, - filter: None, - filter_exact: false, - exclude_should_panic: false, - run_ignored: RunIgnored::No, - run_tests: false, - bench_benchmarks: false, - logfile: None, - nocapture: false, - color: AutoColor, - format: OutputFormat::Pretty, - test_threads: None, - skip: vec![], - options: Options::new(), - } - } -} - /// Result of parsing the options. pub type OptRes = Result; diff --git a/src/libtest/tests.rs b/src/libtest/tests.rs index 05b38f17e2b..f574743e4b6 100644 --- a/src/libtest/tests.rs +++ b/src/libtest/tests.rs @@ -7,6 +7,27 @@ use crate::test::{ }; use std::sync::mpsc::channel; +impl TestOpts { + fn new() -> TestOpts { + TestOpts { + list: false, + filter: None, + filter_exact: false, + exclude_should_panic: false, + run_ignored: RunIgnored::No, + run_tests: false, + bench_benchmarks: false, + logfile: None, + nocapture: false, + color: AutoColor, + format: OutputFormat::Pretty, + test_threads: None, + skip: vec![], + options: Options::new(), + } + } +} + fn one_ignored_one_unignored_test() -> Vec { vec![ TestDescAndFn { -- cgit 1.4.1-3-g733a5