Set test flag when rustdoc is running with --test option
This commit is contained in:
parent
4eff8526a7
commit
8ed2292dbe
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue