Set test flag when rustdoc is running with --test option

This commit is contained in:
Guillaume Gomez 2019-04-13 18:00:40 +02:00
parent 4eff8526a7
commit 8ed2292dbe

View file

@ -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));