@@ -59,7 +59,6 @@ struct TestCtxt<'a> {
5959 testfns : Vec < Test > ,
6060 reexport_test_harness_main : Option < InternedString > ,
6161 is_test_crate : bool ,
62- config : ast:: CrateConfig ,
6362
6463 // top-level re-export submodule, filled out after folding is finished
6564 toplevel_reexport : Option < ast:: Ident > ,
@@ -69,7 +68,6 @@ struct TestCtxt<'a> {
6968// existing main functions, and synthesizing a main test harness
7069pub fn modify_for_testing ( sess : & ParseSess ,
7170 should_test : bool ,
72- cfg : & ast:: CrateConfig ,
7371 krate : ast:: Crate ,
7472 span_diagnostic : & errors:: Handler ) -> ast:: Crate {
7573 // Check for #[reexport_test_harness_main = "some_name"] which
@@ -81,7 +79,7 @@ pub fn modify_for_testing(sess: &ParseSess,
8179 "reexport_test_harness_main" ) ;
8280
8381 if should_test {
84- generate_test_harness ( sess, reexport_test_harness_main, krate, cfg , span_diagnostic)
82+ generate_test_harness ( sess, reexport_test_harness_main, krate, span_diagnostic)
8583 } else {
8684 strip_test_functions ( span_diagnostic, krate)
8785 }
@@ -267,7 +265,6 @@ fn mk_reexport_mod(cx: &mut TestCtxt, tests: Vec<ast::Ident>,
267265fn generate_test_harness ( sess : & ParseSess ,
268266 reexport_test_harness_main : Option < InternedString > ,
269267 krate : ast:: Crate ,
270- cfg : & ast:: CrateConfig ,
271268 sd : & errors:: Handler ) -> ast:: Crate {
272269 // Remove the entry points
273270 let mut cleaner = EntryPointCleaner { depth : 0 } ;
@@ -277,14 +274,13 @@ fn generate_test_harness(sess: &ParseSess,
277274 let mut cx: TestCtxt = TestCtxt {
278275 sess : sess,
279276 span_diagnostic : sd,
280- ext_cx : ExtCtxt :: new ( sess, cfg . clone ( ) ,
277+ ext_cx : ExtCtxt :: new ( sess, vec ! [ ] ,
281278 ExpansionConfig :: default ( "test" . to_string ( ) ) ,
282279 & mut feature_gated_cfgs) ,
283280 path : Vec :: new ( ) ,
284281 testfns : Vec :: new ( ) ,
285282 reexport_test_harness_main : reexport_test_harness_main,
286283 is_test_crate : is_test_crate ( & krate) ,
287- config : krate. config . clone ( ) ,
288284 toplevel_reexport : None ,
289285 } ;
290286 cx. ext_cx . crate_root = Some ( "std" ) ;
0 commit comments