diff options
| author | Seo Sanghyeon <sanxiyn@gmail.com> | 2016-05-24 00:44:44 +0900 |
|---|---|---|
| committer | Seo Sanghyeon <sanxiyn@gmail.com> | 2016-05-24 00:44:44 +0900 |
| commit | f27fbf9a4a9b0191338b59d34dda0ddcfe833754 (patch) | |
| tree | 39081ca403773b7c173208e99c8f8ef9bcd0985e /src/libsyntax | |
| parent | e24d621fcacf59fa8ecc1c1af1c4adeded4bddee (diff) | |
| download | rust-f27fbf9a4a9b0191338b59d34dda0ddcfe833754.tar.gz rust-f27fbf9a4a9b0191338b59d34dda0ddcfe833754.zip | |
Do not inject test harness for --cfg test
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/test.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index 8eeb61e0de4..56485433101 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -68,14 +68,10 @@ struct TestCtxt<'a> { // Traverse the crate, collecting all the test functions, eliding any // existing main functions, and synthesizing a main test harness pub fn modify_for_testing(sess: &ParseSess, + should_test: bool, cfg: &ast::CrateConfig, krate: ast::Crate, span_diagnostic: &errors::Handler) -> ast::Crate { - // We generate the test harness when building in the 'test' - // configuration, either with the '--test' or '--cfg test' - // command line options. - let should_test = attr::contains_name(&krate.config, "test"); - // Check for #[reexport_test_harness_main = "some_name"] which // creates a `use some_name = __test::main;`. This needs to be // unconditional, so that the attribute is still marked as used in |
