Skip to content

Commit

Permalink
Don't pass doctest feature by default
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 10, 2019
1 parent 59a31c8 commit 169a1ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/librustdoc/config.rs
Expand Up @@ -343,10 +343,7 @@ impl Options {
let output = matches.opt_str("o")
.map(|s| PathBuf::from(&s))
.unwrap_or_else(|| PathBuf::from("doc"));
let mut cfgs = matches.opt_strs("cfg");
if should_test {
cfgs.push("doctest".to_string());
}
let cfgs = matches.opt_strs("cfg");

let extension_css = matches.opt_str("e").map(|s| PathBuf::from(&s));

Expand Down
1 change: 1 addition & 0 deletions src/librustdoc/test.rs
Expand Up @@ -64,6 +64,7 @@ pub fn run(options: Options) -> i32 {

let mut cfgs = options.cfgs.clone();
cfgs.push("rustdoc".to_owned());
cfgs.push("doctest".to_owned());
let config = interface::Config {
opts: sessopts,
crate_cfg: config::parse_cfgspecs(cfgs),
Expand Down
5 changes: 2 additions & 3 deletions src/test/rustdoc-ui/cfg-test.stdout
@@ -1,7 +1,6 @@

running 2 tests
test $DIR/cfg-test.rs - Bar (line 28) ... ok
running 1 test
test $DIR/cfg-test.rs - Foo (line 20) ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

0 comments on commit 169a1ca

Please sign in to comment.