@@ -38,6 +38,7 @@ impl DocTestRunner {
38
38
doctest : & DocTestBuilder ,
39
39
scraped_test : & ScrapedDocTest ,
40
40
target_str : & str ,
41
+ opts : & RustdocOptions ,
41
42
) {
42
43
let ignore = match scraped_test. langstr . ignore {
43
44
Ignore :: All => true ,
@@ -61,6 +62,7 @@ impl DocTestRunner {
61
62
self . nb_tests,
62
63
& mut self . output,
63
64
& mut self . output_merged_tests,
65
+ opts,
64
66
) ,
65
67
) ) ;
66
68
self . supports_color &= doctest. supports_color ;
@@ -218,6 +220,7 @@ fn generate_mergeable_doctest(
218
220
id : usize ,
219
221
output : & mut String ,
220
222
output_merged_tests : & mut String ,
223
+ opts : & RustdocOptions ,
221
224
) -> String {
222
225
let test_id = format ! ( "__doctest_{id}" ) ;
223
226
@@ -251,7 +254,7 @@ fn main() {returns_result} {{
251
254
)
252
255
. unwrap ( ) ;
253
256
}
254
- let not_running = ignore || scraped_test. langstr . no_run ;
257
+ let not_running = ignore || scraped_test. no_run ( opts ) ;
255
258
writeln ! (
256
259
output_merged_tests,
257
260
"
@@ -265,7 +268,7 @@ test::StaticTestFn(
265
268
test_name = scraped_test. name,
266
269
file = scraped_test. path( ) ,
267
270
line = scraped_test. line,
268
- no_run = scraped_test. langstr . no_run,
271
+ no_run = scraped_test. no_run( opts ) ,
269
272
should_panic = !scraped_test. langstr. no_run && scraped_test. langstr. should_panic,
270
273
// Setting `no_run` to `true` in `TestDesc` still makes the test run, so we simply
271
274
// don't give it the function to run.
0 commit comments