@@ -39,6 +39,7 @@ impl DocTestRunner {
3939 doctest : & DocTestBuilder ,
4040 scraped_test : & ScrapedDocTest ,
4141 target_str : & str ,
42+ opts : & RustdocOptions ,
4243 ) {
4344 let ignore = match scraped_test. langstr . ignore {
4445 Ignore :: All => true ,
@@ -62,6 +63,7 @@ impl DocTestRunner {
6263 self . nb_tests,
6364 & mut self . output,
6465 & mut self . output_merged_tests,
66+ opts,
6567 ) ,
6668 ) ) ;
6769 self . supports_color &= doctest. supports_color ;
@@ -223,6 +225,7 @@ fn generate_mergeable_doctest(
223225 id : usize ,
224226 output : & mut String ,
225227 output_merged_tests : & mut String ,
228+ opts : & RustdocOptions ,
226229) -> String {
227230 let test_id = format ! ( "__doctest_{id}" ) ;
228231
@@ -256,7 +259,7 @@ fn main() {returns_result} {{
256259 )
257260 . unwrap ( ) ;
258261 }
259- let not_running = ignore || scraped_test. langstr . no_run ;
262+ let not_running = ignore || scraped_test. no_run ( opts ) ;
260263 writeln ! (
261264 output_merged_tests,
262265 "
@@ -270,7 +273,7 @@ test::StaticTestFn(
270273 test_name = scraped_test. name,
271274 file = scraped_test. path( ) ,
272275 line = scraped_test. line,
273- no_run = scraped_test. langstr . no_run,
276+ no_run = scraped_test. no_run( opts ) ,
274277 should_panic = !scraped_test. langstr. no_run && scraped_test. langstr. should_panic,
275278 // Setting `no_run` to `true` in `TestDesc` still makes the test run, so we simply
276279 // don't give it the function to run.
0 commit comments