@@ -57,23 +57,6 @@ release: 1.17.0
5757LLVM version: 3.9
5858```
5959
60- ## ` -r ` /` --input-format ` : input format
61-
62- This flag is currently ignored; the idea is that ` rustdoc ` would support various
63- input formats, and you could specify them via this flag.
64-
65- Rustdoc only supports Rust source code and Markdown input formats. If the
66- file ends in ` .md ` or ` .markdown ` , ` rustdoc ` treats it as a Markdown file.
67- Otherwise, it assumes that the input file is Rust.
68-
69-
70- ## ` -w ` /` --output-format ` : output format
71-
72- This flag is currently ignored; the idea is that ` rustdoc ` would support
73- various output formats, and you could specify them via this flag.
74-
75- Rustdoc only supports HTML output, and so this flag is redundant today.
76-
7760## ` -o ` /` --output ` : output path
7861
7962Using this flag looks like this:
@@ -100,6 +83,25 @@ By default, `rustdoc` assumes that the name of your crate is the same name
10083as the ` .rs ` file. ` --crate-name ` lets you override this assumption with
10184whatever name you choose.
10285
86+ ## ` --document-private-items ` : Show items that are not public
87+
88+ Using this flag looks like this:
89+
90+ ``` bash
91+ $ rustdoc src/lib.rs --document-private-items
92+ ```
93+
94+ By default, ` rustdoc ` only documents items that are publicly reachable.
95+
96+ ``` rust
97+ pub fn public () {} // this item is public and will documented
98+ mod private { // this item is private and will not be documented
99+ pub fn unreachable () {} // this item is public, but unreachable, so it will not be documented
100+ }
101+ ```
102+
103+ ` --document-private-items ` documents all items, even if they're not public.
104+
103105## ` -L ` /` --library-path ` : where to look for dependencies
104106
105107Using this flag looks like this:
@@ -166,38 +168,6 @@ affect that.
166168The arguments to this flag are the same as those for the ` -C ` flag on rustc. Run ` rustc -C help ` to
167169get the full list.
168170
169- ## ` --passes ` : add more rustdoc passes
170-
171- Using this flag looks like this:
172-
173- ``` bash
174- $ rustdoc --passes list
175- $ rustdoc src/lib.rs --passes strip-priv-imports
176- ```
177-
178- An argument of "list" will print a list of possible "rustdoc passes", and other
179- arguments will be the name of which passes to run in addition to the defaults.
180-
181- For more details on passes, see [ the chapter on them] ( passes.md ) .
182-
183- See also ` --no-defaults ` .
184-
185- ## ` --no-defaults ` : don't run default passes
186-
187- Using this flag looks like this:
188-
189- ``` bash
190- $ rustdoc src/lib.rs --no-defaults
191- ```
192-
193- By default, ` rustdoc ` will run several passes over your code. This
194- removes those defaults, allowing you to use ` --passes ` to specify
195- exactly which passes you want.
196-
197- For more details on passes, see [ the chapter on them] ( passes.md ) .
198-
199- See also ` --passes ` .
200-
201171## ` --test ` : run code examples as tests
202172
203173Using this flag looks like this:
@@ -429,3 +399,21 @@ If you specify `@path` on the command-line, then it will open `path` and read
429399command line options from it. These options are one per line; a blank line indicates
430400an empty option. The file can use Unix or Windows style line endings, and must be
431401encoded as UTF-8.
402+
403+ ## ` --passes ` : add more rustdoc passes
404+
405+ This flag is ** deprecated** .
406+ For more details on passes, see [ the chapter on them] ( passes.md ) .
407+
408+ ## ` --no-defaults ` : don't run default passes
409+
410+ This flag is ** deprecated** .
411+ For more details on passes, see [ the chapter on them] ( passes.md ) .
412+
413+ ## ` -r ` /` --input-format ` : input format
414+
415+ This flag is ** deprecated** and ** has no effect** .
416+
417+ Rustdoc only supports Rust source code and Markdown input formats. If the
418+ file ends in ` .md ` or ` .markdown ` , ` rustdoc ` treats it as a Markdown file.
419+ Otherwise, it assumes that the input file is Rust.
0 commit comments