rustdoc: set cfg(doctest) when collecting doctests
This commit is contained in:
parent
b0bd5f236d
commit
bed54cf854
9 changed files with 77 additions and 3 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("doctest".to_string());
|
||||
}
|
||||
|
||||
let extension_css = matches.opt_str("e").map(|s| PathBuf::from(&s));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue