@@ -59,7 +59,6 @@ struct TestCtxt<'a> {
59
59
testfns : Vec < Test > ,
60
60
reexport_test_harness_main : Option < InternedString > ,
61
61
is_test_crate : bool ,
62
- config : ast:: CrateConfig ,
63
62
64
63
// top-level re-export submodule, filled out after folding is finished
65
64
toplevel_reexport : Option < ast:: Ident > ,
@@ -69,7 +68,6 @@ struct TestCtxt<'a> {
69
68
// existing main functions, and synthesizing a main test harness
70
69
pub fn modify_for_testing ( sess : & ParseSess ,
71
70
should_test : bool ,
72
- cfg : & ast:: CrateConfig ,
73
71
krate : ast:: Crate ,
74
72
span_diagnostic : & errors:: Handler ) -> ast:: Crate {
75
73
// Check for #[reexport_test_harness_main = "some_name"] which
@@ -81,7 +79,7 @@ pub fn modify_for_testing(sess: &ParseSess,
81
79
"reexport_test_harness_main" ) ;
82
80
83
81
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)
85
83
} else {
86
84
strip_test_functions ( span_diagnostic, krate)
87
85
}
@@ -267,7 +265,6 @@ fn mk_reexport_mod(cx: &mut TestCtxt, tests: Vec<ast::Ident>,
267
265
fn generate_test_harness ( sess : & ParseSess ,
268
266
reexport_test_harness_main : Option < InternedString > ,
269
267
krate : ast:: Crate ,
270
- cfg : & ast:: CrateConfig ,
271
268
sd : & errors:: Handler ) -> ast:: Crate {
272
269
// Remove the entry points
273
270
let mut cleaner = EntryPointCleaner { depth : 0 } ;
@@ -277,14 +274,13 @@ fn generate_test_harness(sess: &ParseSess,
277
274
let mut cx: TestCtxt = TestCtxt {
278
275
sess : sess,
279
276
span_diagnostic : sd,
280
- ext_cx : ExtCtxt :: new ( sess, cfg . clone ( ) ,
277
+ ext_cx : ExtCtxt :: new ( sess, vec ! [ ] ,
281
278
ExpansionConfig :: default ( "test" . to_string ( ) ) ,
282
279
& mut feature_gated_cfgs) ,
283
280
path : Vec :: new ( ) ,
284
281
testfns : Vec :: new ( ) ,
285
282
reexport_test_harness_main : reexport_test_harness_main,
286
283
is_test_crate : is_test_crate ( & krate) ,
287
- config : krate. config . clone ( ) ,
288
284
toplevel_reexport : None ,
289
285
} ;
290
286
cx. ext_cx . crate_root = Some ( "std" ) ;
0 commit comments