File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -343,10 +343,7 @@ impl Options {
343343 let output = matches. opt_str ( "o" )
344344 . map ( |s| PathBuf :: from ( & s) )
345345 . unwrap_or_else ( || PathBuf :: from ( "doc" ) ) ;
346- let mut cfgs = matches. opt_strs ( "cfg" ) ;
347- if should_test {
348- cfgs. push ( "doctest" . to_string ( ) ) ;
349- }
346+ let cfgs = matches. opt_strs ( "cfg" ) ;
350347
351348 let extension_css = matches. opt_str ( "e" ) . map ( |s| PathBuf :: from ( & s) ) ;
352349
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ pub fn run(options: Options) -> i32 {
6464
6565 let mut cfgs = options. cfgs . clone ( ) ;
6666 cfgs. push ( "rustdoc" . to_owned ( ) ) ;
67+ cfgs. push ( "doctest" . to_owned ( ) ) ;
6768 let config = interface:: Config {
6869 opts : sessopts,
6970 crate_cfg : config:: parse_cfgspecs ( cfgs) ,
Original file line number Diff line number Diff line change 11
2- running 2 tests
3- test $DIR/cfg-test.rs - Bar (line 28) ... ok
2+ running 1 test
43test $DIR/cfg-test.rs - Foo (line 20) ... ok
54
6- test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
5+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
76
You can’t perform that action at this time.
0 commit comments