Rollup merge of #91310 - hi-rustin:rustin-patch-rustdoc, r=jyn514
Add --out-dir flag for rustdoc part of https://github.com/rust-lang/rust/issues/91260 Add --out-dir flag for rustdoc and change the `-o` option to point to out-dir. I'm not quite sure if it should be stable, also I'm not sure if this parameter priority is appropriate? Or should I just refuse to pass both parameters at the same time? r? `@jyn514`
This commit is contained in:
commit
d8bb4d69db
11 changed files with 57 additions and 5 deletions
8
src/test/run-make/rustdoc-with-out-dir-option/Makefile
Normal file
8
src/test/run-make/rustdoc-with-out-dir-option/Makefile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
|
||||
|
||||
all:
|
||||
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --out-dir $(OUTPUT_DIR)
|
||||
|
||||
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
|
||||
2
src/test/run-make/rustdoc-with-out-dir-option/src/lib.rs
Normal file
2
src/test/run-make/rustdoc-with-out-dir-option/src/lib.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// @has foobar/fn.ok.html
|
||||
pub fn ok() {}
|
||||
8
src/test/run-make/rustdoc-with-output-option/Makefile
Normal file
8
src/test/run-make/rustdoc-with-output-option/Makefile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
|
||||
|
||||
all:
|
||||
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib --output $(OUTPUT_DIR)
|
||||
|
||||
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
|
||||
2
src/test/run-make/rustdoc-with-output-option/src/lib.rs
Normal file
2
src/test/run-make/rustdoc-with-output-option/src/lib.rs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// @has foobar/fn.ok.html
|
||||
pub fn ok() {}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
-include ../../run-make-fulldeps/tools.mk
|
||||
|
||||
OUTPUT_DIR := "$(TMPDIR)/rustdoc"
|
||||
|
||||
all:
|
||||
$(RUSTDOC) src/lib.rs --crate-name foobar --crate-type lib -o $(OUTPUT_DIR)
|
||||
|
||||
$(HTMLDOCCK) $(OUTPUT_DIR) src/lib.rs
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
// @has foobar/fn.ok.html
|
||||
pub fn ok() {}
|
||||
|
|
@ -0,0 +1 @@
|
|||
// compile-flags: --output ./foo
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
error: cannot use both 'out-dir' and 'output' at once
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue