Skip to content

Commit 2f0dc04

Browse files
committed
address review feedback
1 parent fd2cbf9 commit 2f0dc04

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

src/doc/rustdoc/src/command-line-arguments.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This will show `rustdoc`'s version, which will look something
3030
like this:
3131

3232
```text
33-
rustdoc 1.y.0 (hash date)
33+
rustdoc 1.17.0 (56124baa9 2017-04-24)
3434
```
3535

3636
## `-v`/`--verbose`: more verbose output
@@ -47,18 +47,16 @@ to standard out. What is written depends on the other flags you've passed in.
4747
For example, with `--version`:
4848

4949
```text
50-
$ rustdoc --version -v
51-
rustdoc 1.y.0 (hash date)
50+
$ rustdoc --verbose --version
51+
rustdoc 1.17.0 (56124baa9 2017-04-24)
5252
binary: rustdoc
5353
commit-hash: hash
5454
commit-date: date
5555
host: host-triple
56-
release: 1.y.0
57-
LLVM version: x.y
56+
release: 1.17.0
57+
LLVM version: 3.9
5858
```
5959

60-
stable(optopt("r", "input-format", "the input type of the specified file",
61-
"[rust]")),
6260
## `-r`/`--input-format`: input format
6361

6462
This flag is currently ignored; the idea is that `rustdoc` would support various
@@ -69,8 +67,6 @@ file ends in `.md` or `.markdown`, `rustdoc` treats it as a Markdown file.
6967
Otherwise, it assumes that the input file is Rust.
7068

7169

72-
stable(optopt("w", "output-format", "the output type to write",
73-
"[html]")),
7470
## `-w`/`--output-format`: output format
7571

7672
This flag is currently ignored; the idea is that `rustdoc` would support
@@ -92,7 +88,6 @@ the current working directory. With this flag, it will place all output
9288
into the directory you specify.
9389

9490

95-
stable(optopt("", "crate-name", "specify the name of this crate", "NAME")),
9691
## `--crate-name`: controlling the name of the crate
9792

9893
Using this flag looks like this:
@@ -105,8 +100,6 @@ By default, `rustodc` assumes that the name of your crate is the same name
105100
as the `.rs` file. `--crate-name` lets you override this assumption with
106101
whatever name you choose.
107102

108-
stable(optmulti("L", "library-path", "directory to add to crate search path",
109-
"DIR")),
110103
## `-L`/`--library-path`:
111104

112105
Using this flag looks like this:
@@ -219,8 +212,6 @@ on documentation tests](documentation-tests.html).
219212

220213
See also `--test-args`.
221214

222-
stable(optmulti("", "test-args", "arguments to pass to the test runner",
223-
"ARGS")),
224215
## `--test-args`:
225216

226217
Using this flag looks like this:
@@ -234,7 +225,6 @@ For more, see [the chapter on documentation tests](documentation-tests.html).
234225

235226
See also `--test`.
236227

237-
stable(optopt("", "target", "target triple to document", "TRIPLE")),
238228
## `--target`:
239229

240230
Using this flag looks like this:

src/doc/rustdoc/src/what-is-rustdoc.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# What is rustdoc?
22

3-
The standard Rust distribution ships with a tool called `rustdoc`. It's job is
3+
The standard Rust distribution ships with a tool called `rustdoc`. Its job is
44
to generate documentation for Rust projects. On a fundamental level, Rustdoc
55
takes as an argument either a crate root or a Markdown file, and produces HTML,
66
CSS, and JavaScript.
@@ -10,7 +10,7 @@ CSS, and JavaScript.
1010
Let's give it a try! Let's create a new project with Cargo:
1111

1212
```bash
13-
$ cargo new docs -- lib
13+
$ cargo new docs
1414
$ cd docs
1515
```
1616

@@ -52,7 +52,7 @@ our code...
5252

5353
```rust
5454
/// foo is a function
55-
fn foo() {}
55+
pub fn foo() {}
5656
```
5757

5858
... and then re-run `rustdoc`:
@@ -82,6 +82,8 @@ $ rustdoc --crate-name docs srclib.rs -o <path>\docs\target\doc -L
8282
dependency=<path>docs\target\debug\deps
8383
```
8484

85+
You can see this with `cargo doc --verbose`.
86+
8587
It generates the correct `--crate-name` for us, as well as pointing to
8688
`src/lib.rs` But what about those other arguments? `-o` controls the
8789
*o*utput of our docs. Instead of a top-level `doc` directory, you'll

0 commit comments

Comments
 (0)