@@ -39,6 +39,7 @@ impl DocTestRunner {
39
39
doctest : & DocTestBuilder ,
40
40
scraped_test : & ScrapedDocTest ,
41
41
target_str : & str ,
42
+ opts : & RustdocOptions ,
42
43
) {
43
44
let ignore = match scraped_test. langstr . ignore {
44
45
Ignore :: All => true ,
@@ -62,6 +63,7 @@ impl DocTestRunner {
62
63
self . nb_tests,
63
64
& mut self . output,
64
65
& mut self . output_merged_tests,
66
+ opts,
65
67
) ,
66
68
) ) ;
67
69
self . supports_color &= doctest. supports_color ;
@@ -223,6 +225,7 @@ fn generate_mergeable_doctest(
223
225
id : usize ,
224
226
output : & mut String ,
225
227
output_merged_tests : & mut String ,
228
+ opts : & RustdocOptions ,
226
229
) -> String {
227
230
let test_id = format ! ( "__doctest_{id}" ) ;
228
231
@@ -256,7 +259,7 @@ fn main() {returns_result} {{
256
259
)
257
260
. unwrap ( ) ;
258
261
}
259
- let not_running = ignore || scraped_test. langstr . no_run ;
262
+ let not_running = ignore || scraped_test. no_run ( opts ) ;
260
263
writeln ! (
261
264
output_merged_tests,
262
265
"
@@ -270,7 +273,7 @@ test::StaticTestFn(
270
273
test_name = scraped_test. name,
271
274
file = scraped_test. path( ) ,
272
275
line = scraped_test. line,
273
- no_run = scraped_test. langstr . no_run,
276
+ no_run = scraped_test. no_run( opts ) ,
274
277
should_panic = !scraped_test. langstr. no_run && scraped_test. langstr. should_panic,
275
278
// Setting `no_run` to `true` in `TestDesc` still makes the test run, so we simply
276
279
// don't give it the function to run.
0 commit comments