@@ -38,6 +38,7 @@ impl DocTestRunner {
3838 doctest : & DocTestBuilder ,
3939 scraped_test : & ScrapedDocTest ,
4040 target_str : & str ,
41+ opts : & RustdocOptions ,
4142 ) {
4243 let ignore = match scraped_test. langstr . ignore {
4344 Ignore :: All => true ,
@@ -61,6 +62,7 @@ impl DocTestRunner {
6162 self . nb_tests,
6263 & mut self . output,
6364 & mut self . output_merged_tests,
65+ opts,
6466 ) ,
6567 ) ) ;
6668 self . supports_color &= doctest. supports_color ;
@@ -218,6 +220,7 @@ fn generate_mergeable_doctest(
218220 id : usize ,
219221 output : & mut String ,
220222 output_merged_tests : & mut String ,
223+ opts : & RustdocOptions ,
221224) -> String {
222225 let test_id = format ! ( "__doctest_{id}" ) ;
223226
@@ -251,7 +254,7 @@ fn main() {returns_result} {{
251254 )
252255 . unwrap ( ) ;
253256 }
254- let not_running = ignore || scraped_test. langstr . no_run ;
257+ let not_running = ignore || scraped_test. no_run ( opts ) ;
255258 writeln ! (
256259 output_merged_tests,
257260 "
@@ -265,7 +268,7 @@ test::StaticTestFn(
265268 test_name = scraped_test. name,
266269 file = scraped_test. path( ) ,
267270 line = scraped_test. line,
268- no_run = scraped_test. langstr . no_run,
271+ no_run = scraped_test. no_run( opts ) ,
269272 should_panic = !scraped_test. langstr. no_run && scraped_test. langstr. should_panic,
270273 // Setting `no_run` to `true` in `TestDesc` still makes the test run, so we simply
271274 // don't give it the function to run.
0 commit comments