@@ -575,7 +575,7 @@ pub(crate) struct RunnableDocTest<'a> {
575575 /// In a standalone test this is just the regular test code.
576576 full_test_code : String ,
577577 full_test_line_offset : usize ,
578- test_opts : & ' a IndividualTestOptions ,
578+ test_opts : IndividualTestOptions ,
579579 global_opts : & ' a GlobalTestOptions ,
580580 langstr : LangString ,
581581 line : usize ,
@@ -1143,8 +1143,6 @@ fn generate_test_desc_and_fn(
11431143 unused_externs : Arc < Mutex < Vec < UnusedExterns > > > ,
11441144) -> test:: TestDescAndFn {
11451145 let target_str = rustdoc_options. target . to_string ( ) ;
1146- let rustdoc_test_options =
1147- IndividualTestOptions :: new ( & rustdoc_options, & test. test_id , scraped_test. local_path ( ) ) ;
11481146
11491147 debug ! ( "creating test {}: {}" , scraped_test. name, scraped_test. text) ;
11501148 test:: TestDescAndFn {
@@ -1168,8 +1166,13 @@ fn generate_test_desc_and_fn(
11681166 test_type : test:: TestType :: DocTest ,
11691167 } ,
11701168 testfn : test:: DynTestFn ( Arc :: new ( move || {
1169+ let rustdoc_test_options = IndividualTestOptions :: new (
1170+ & rustdoc_options,
1171+ & test. test_id ,
1172+ scraped_test. local_path ( ) ,
1173+ ) ;
11711174 doctest_run_fn (
1172- & rustdoc_test_options,
1175+ rustdoc_test_options,
11731176 & opts,
11741177 & test,
11751178 & scraped_test,
@@ -1181,7 +1184,7 @@ fn generate_test_desc_and_fn(
11811184}
11821185
11831186fn doctest_run_fn (
1184- test_opts : & IndividualTestOptions ,
1187+ test_opts : IndividualTestOptions ,
11851188 global_opts : & GlobalTestOptions ,
11861189 doctest : & DocTestBuilder ,
11871190 scraped_test : & ScrapedDocTest ,
0 commit comments