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:
Matthias Krüger 2021-12-11 08:22:30 +01:00 committed by GitHub
commit d8bb4d69db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 57 additions and 5 deletions

View file

@ -57,13 +57,13 @@ release: 1.17.0
LLVM version: 3.9
```
## `-o`/`--output`: output path
## `-o`/`--out-dir`: output directory path
Using this flag looks like this:
```bash
$ rustdoc src/lib.rs -o target/doc
$ rustdoc src/lib.rs --output target/doc
$ rustdoc src/lib.rs --out-dir target/doc
```
By default, `rustdoc`'s output appears in a directory named `doc` in