Skip to content

Commit 7104524

Browse files
committed
Add test for default rustdoc run
1 parent 4dd5492 commit 7104524

File tree

4 files changed

+199
-0
lines changed

4 files changed

+199
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-include ../../run-make-fulldeps/tools.mk
2+
3+
all:
4+
$(BARE_RUSTDOC) 2>&1 | diff - output-default.stdout
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a test to verify that the default behavior of `rustdoc` is printing out help output instead of erroring out (#88756).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
rustdoc [options] <input>
2+
3+
Options:
4+
-h, --help show this help message
5+
-V, --version print rustdoc's version
6+
-v, --verbose use verbose output
7+
-w, --output-format [html]
8+
the output type to write
9+
--output PATH Which directory to place the output. This option is
10+
deprecated, use --out-dir instead.
11+
-o, --out-dir PATH which directory to place the output
12+
--crate-name NAME
13+
specify the name of this crate
14+
--crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
15+
Comma separated list of types of crates
16+
for the compiler to emit
17+
-L, --library-path DIR
18+
directory to add to crate search path
19+
--cfg pass a --cfg to rustc
20+
--check-cfg pass a --check-cfg to rustc
21+
--extern NAME[=PATH]
22+
pass an --extern to rustc
23+
--extern-html-root-url NAME=URL
24+
base URL to use for dependencies; for example,
25+
"std=/doc" links std::vec::Vec to
26+
/doc/std/vec/struct.Vec.html
27+
--extern-html-root-takes-precedence
28+
give precedence to `--extern-html-root-url`, not
29+
`html_root_url`
30+
-C, --codegen OPT[=VALUE]
31+
pass a codegen option to rustc
32+
--document-private-items
33+
document private items
34+
--document-hidden-items
35+
document items that have doc(hidden)
36+
--test run code examples as tests
37+
--test-args ARGS
38+
arguments to pass to the test runner
39+
--test-run-directory PATH
40+
The working directory in which to run tests
41+
--target TRIPLE target triple to document
42+
--markdown-css FILES
43+
CSS files to include via <link> in a rendered Markdown
44+
file
45+
--html-in-header FILES
46+
files to include inline in the <head> section of a
47+
rendered Markdown file or generated documentation
48+
--html-before-content FILES
49+
files to include inline between <body> and the content
50+
of a rendered Markdown file or generated documentation
51+
--html-after-content FILES
52+
files to include inline between the content and
53+
</body> of a rendered Markdown file or generated
54+
documentation
55+
--markdown-before-content FILES
56+
files to include inline between <body> and the content
57+
of a rendered Markdown file or generated documentation
58+
--markdown-after-content FILES
59+
files to include inline between the content and
60+
</body> of a rendered Markdown file or generated
61+
documentation
62+
--markdown-playground-url URL
63+
URL to send code snippets to
64+
--markdown-no-toc
65+
don't include table of contents
66+
-e, --extend-css PATH
67+
To add some CSS rules with a given file to generate
68+
doc with your own theme. However, your theme might
69+
break if the rustdoc's generated HTML changes, so be
70+
careful!
71+
-Z FLAG internal and debugging options (only on nightly build)
72+
--sysroot PATH Override the system root
73+
--playground-url URL
74+
URL to send code snippets to, may be reset by
75+
--markdown-playground-url or
76+
`#![doc(html_playground_url=...)]`
77+
--display-doctest-warnings
78+
show warnings that originate in doctests
79+
--crate-version VERSION
80+
crate version to print into documentation
81+
--sort-modules-by-appearance
82+
sort modules by where they appear in the program,
83+
rather than alphabetically
84+
--default-theme THEME
85+
Set the default theme. THEME should be the theme name,
86+
generally lowercase. If an unknown default theme is
87+
specified, the builtin default is used. The set of
88+
themes, and the rustdoc built-in default, are not
89+
stable.
90+
--default-setting SETTING[=VALUE]
91+
Default value for a rustdoc setting (used when
92+
"rustdoc-SETTING" is absent from web browser Local
93+
Storage). If VALUE is not supplied, "true" is used.
94+
Supported SETTINGs and VALUEs are not documented and
95+
not stable.
96+
--theme FILES additional themes which will be added to the generated
97+
docs
98+
--check-theme FILES
99+
check if given theme is valid
100+
--resource-suffix PATH
101+
suffix to add to CSS and JavaScript files, e.g.,
102+
"light.css" will become "light-suffix.css"
103+
--edition EDITION
104+
edition to use when compiling rust code (default:
105+
2015)
106+
--color auto|always|never
107+
Configure coloring of output:
108+
auto = colorize, if output goes to a tty (default);
109+
always = always colorize output;
110+
never = never colorize output
111+
--error-format human|json|short
112+
How errors and other messages are produced
113+
--json CONFIG Configure the structure of JSON diagnostics
114+
--disable-minification
115+
Disable minification applied on JS files
116+
-A, --allow LINT Set lint allowed
117+
-W, --warn LINT Set lint warnings
118+
--force-warn LINT
119+
Set lint force-warn
120+
-D, --deny LINT Set lint denied
121+
-F, --forbid LINT Set lint forbidden
122+
--cap-lints LEVEL
123+
Set the most restrictive lint level. More restrictive
124+
lints are capped at this level. By default, it is at
125+
`forbid` level.
126+
--index-page PATH
127+
Markdown file to be used as index page
128+
--enable-index-page
129+
To enable generation of the index page
130+
--static-root-path PATH
131+
Path string to force loading static files from in
132+
output pages. If not set, uses combinations of '../'
133+
to reach the documentation root.
134+
--disable-per-crate-search
135+
disables generating the crate selector on the search
136+
box
137+
--persist-doctests PATH
138+
Directory to persist doctest executables into
139+
--show-coverage
140+
calculate percentage of public items with
141+
documentation
142+
--enable-per-target-ignores
143+
parse ignore-foo for ignoring doctests on a per-target
144+
basis
145+
--runtool The tool to run tests with when building for a different target than host
146+
147+
--runtool-arg One (of possibly many) arguments to pass to the runtool
148+
149+
--test-builder PATH
150+
The rustc-like binary to use as the test builder
151+
--check Run rustdoc checks
152+
--generate-redirect-map
153+
Generate JSON file at the top level instead of
154+
generating HTML redirection files
155+
--emit [unversioned-shared-resources,toolchain-shared-resources,invocation-specific]
156+
Comma separated list of types of output for rustdoc to
157+
emit
158+
--no-run Compile doctests without running them
159+
--show-type-layout
160+
Include the memory layout of types in the docs
161+
--nocapture Don't capture stdout and stderr of tests
162+
--generate-link-to-definition
163+
Make the identifiers in the HTML source code pages
164+
navigable
165+
--scrape-examples-output-path collect function call information and output at the given path
166+
167+
--scrape-examples-target-crate collect function call information for functions from the target crate
168+
169+
--scrape-tests Include test code when scraping examples
170+
--with-examples path to function call information (for displaying examples in the documentation)
171+
172+
--plugin-path DIR
173+
removed, see issue #44136
174+
<https://github.com/rust-lang/rust/issues/44136> for
175+
more information
176+
--passes PASSES removed, see issue #44136
177+
<https://github.com/rust-lang/rust/issues/44136> for
178+
more information
179+
--plugins PLUGINS
180+
removed, see issue #44136
181+
<https://github.com/rust-lang/rust/issues/44136> for
182+
more information
183+
--no-defaults removed, see issue #44136
184+
<https://github.com/rust-lang/rust/issues/44136> for
185+
more information
186+
-r, --input-format [rust]
187+
removed, see issue #44136
188+
<https://github.com/rust-lang/rust/issues/44136> for
189+
more information
190+
191+
@path Read newline separated options from `path`
192+
193+
More information available at https://doc.rust-lang.org/nightly/rustdoc/what-is-rustdoc.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// nothing to see here

0 commit comments

Comments
 (0)