Skip to content

Commit

Permalink
Set test flag when rustdoc is running with --test option
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 24, 2019
1 parent 4eff852 commit 8ed2292
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/librustdoc/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ impl Options {
.unwrap_or_else(|| PathBuf::from("doc"));
let mut cfgs = matches.opt_strs("cfg");
cfgs.push("rustdoc".to_string());
if should_test {
cfgs.push("test".to_string());
}

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

Expand Down

0 comments on commit 8ed2292

Please sign in to comment.