Skip to content

Commit c56b81e

Browse files
committed
Add test for default rustdoc run
1 parent 24a256c commit c56b81e

File tree

4 files changed

+198
-0
lines changed

4 files changed

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

0 commit comments

Comments
 (0)