rustdoc: set cfg(doctest) when collecting doctests

This commit is contained in:
QuietMisdreavus 2019-06-28 10:31:27 -05:00
parent b0bd5f236d
commit bed54cf854
9 changed files with 77 additions and 3 deletions

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("doctest".to_string());
}
let extension_css = matches.opt_str("e").map(|s| PathBuf::from(&s));