auto merge of #13255 : alexcrichton/rust/issue-5605, r=huonw
These syntax extensions need a place to be documented, and this starts passing a `--cfg dox` parameter to `rustdoc` when building and testing documentation in order to document macros so that they have no effect on the compiled crate, but only documentation. Closes #5605
This commit is contained in:
commit
540c2a2a27
5 changed files with 277 additions and 12 deletions
|
@ -168,6 +168,7 @@ pub fn main_args(args: &[~str]) -> int {
|
|||
let markdown_input = input.ends_with(".md") || input.ends_with(".markdown");
|
||||
|
||||
let output = matches.opt_str("o").map(|s| Path::new(s));
|
||||
let cfgs = matches.opt_strs("cfg");
|
||||
|
||||
match (should_test, markdown_input) {
|
||||
(true, true) => {
|
||||
|
@ -175,7 +176,8 @@ pub fn main_args(args: &[~str]) -> int {
|
|||
libs,
|
||||
test_args.move_iter().collect())
|
||||
}
|
||||
(true, false) => return test::run(input, libs, test_args),
|
||||
(true, false) => return test::run(input, cfgs.move_iter().collect(),
|
||||
libs, test_args),
|
||||
|
||||
(false, true) => return markdown::render(input, output.unwrap_or(Path::new("doc")),
|
||||
&matches),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue