Skip to content

Commit 451f97e

Browse files
committed
Auto merge of #6459 - ehuss:fix-man-checks, r=alexcrichton
Fix new man page links. The rustc link checker found some problems: - The raw generated HTML files were being included when they shouldn't. Fixed by moving them out of the mdbook directory. - The `print.html` file concatenates all the pages together, causing duplicate `id`'s. Fix by giving each page a unique set of IDs.
2 parents 8ffc960 + 4338d34 commit 451f97e

File tree

119 files changed

+521
-492
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+521
-492
lines changed

src/doc/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
# format. See https://asciidoctor.org/ for more information.
55
#
66
# Just run `make` and it will generate the man pages in src/etc/man and the
7-
# HTML pages in src/doc/src/commands/generated.
7+
# HTML pages in src/doc/man/generated.
88
#
99
# There are some Asciidoctor extensions, see the file `asciidoc-extensions.rb`
1010
# for the documentation.
1111

1212
MAN_SOURCE = $(sort $(wildcard man/cargo*.adoc))
1313
COMMANDS = $(notdir $(MAN_SOURCE))
14-
HTML = $(patsubst %.adoc,src/commands/generated/%.html,$(COMMANDS))
14+
HTML = $(patsubst %.adoc,man/generated/%.html,$(COMMANDS))
1515
MAN_LOCATION = ../etc/man
1616
MAN = $(patsubst %.adoc,$(MAN_LOCATION)/%.1,$(COMMANDS))
1717
ASCIIDOCOPTS = -r ./asciidoc-extension.rb
@@ -21,7 +21,7 @@ all: commands-html man
2121
commands-html: $(HTML)
2222
man: $(MAN)
2323

24-
$(HTML): src/commands/generated/%.html : man/%.adoc asciidoc-extension.rb $(OTHER_DEPS)
24+
$(HTML): man/generated/%.html : man/%.adoc asciidoc-extension.rb $(OTHER_DEPS)
2525
asciidoctor $(ASCIIDOCOPTS) -s $< -o $@
2626

2727
$(MAN): $(MAN_LOCATION)/%.1 : man/%.adoc $(OTHER_DEPS)

src/doc/man/cargo-bench.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-bench(1)
2+
:idprefix: cargo_bench_
23
:doctype: manpage
34
:actionverb: Benchmark
45
:nouns: benchmarks

src/doc/man/cargo-build.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-build(1)
2+
:idprefix: cargo_build_
23
:doctype: manpage
34
:actionverb: Build
45

src/doc/man/cargo-check.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-check(1)
2+
:idprefix: cargo_check_
23
:doctype: manpage
34
:actionverb: Check
45

src/doc/man/cargo-clean.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-clean(1)
2+
:idprefix: cargo_clean_
23
:doctype: manpage
34
:actionverb: Clean
45

src/doc/man/cargo-doc.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-doc(1)
2+
:idprefix: cargo_doc_
23
:doctype: manpage
34
:actionverb: Document
45

src/doc/man/cargo-fetch.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-fetch(1)
2+
:idprefix: cargo_fetch_
23
:doctype: manpage
34
:actionverb: Fetch
45

src/doc/man/cargo-fix.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-fix(1)
2+
:idprefix: cargo_fix_
23
:doctype: manpage
34
:actionverb: Fix
45

src/doc/man/cargo-generate-lockfile.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-generate-lockfile(1)
2+
:idprefix: cargo_generate-lockfile_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-help.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-help(1)
2+
:idprefix: cargo_help_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-init.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-init(1)
2+
:idprefix: cargo_init_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-install.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-install(1)
2+
:idprefix: cargo_install_
23
:doctype: manpage
34
:actionverb: Install
45

src/doc/man/cargo-locate-project.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-locate-project(1)
2+
:idprefix: cargo_locate-project_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-login.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-login(1)
2+
:idprefix: cargo_login_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-metadata.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-metadata(1)
2+
:idprefix: cargo_metadata_
23
:doctype: manpage
34
:source-highlighter: highlightjs
45

src/doc/man/cargo-new.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-new(1)
2+
:idprefix: cargo_new_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-owner.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-owner(1)
2+
:idprefix: cargo_owner_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-package.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-package(1)
2+
:idprefix: cargo_package_
23
:doctype: manpage
34
:actionverb: Package
45

src/doc/man/cargo-pkgid.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-pkgid(1)
2+
:idprefix: cargo_pkgid_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-publish.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-publish(1)
2+
:idprefix: cargo_publish_
23
:doctype: manpage
34
:actionverb: Publish
45

src/doc/man/cargo-run.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-run(1)
2+
:idprefix: cargo_run_
23
:doctype: manpage
34
:actionverb: Run
45

src/doc/man/cargo-rustc.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-rustc(1)
2+
:idprefix: cargo_rustc_
23
:doctype: manpage
34
:actionverb: Build
45

src/doc/man/cargo-rustdoc.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-rustdoc(1)
2+
:idprefix: cargo_rustdoc_
23
:doctype: manpage
34
:actionverb: Document
45

src/doc/man/cargo-search.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-search(1)
2+
:idprefix: cargo_search_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-test.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-test(1)
2+
:idprefix: cargo_test_
23
:doctype: manpage
34
:actionverb: Test
45
:nouns: tests

src/doc/man/cargo-uninstall.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-uninstall(1)
2+
:idprefix: cargo_uninstall_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-update.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-update(1)
2+
:idprefix: cargo_update_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-verify-project.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-verify-project(1)
2+
:idprefix: cargo_verify-project_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-version.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-version(1)
2+
:idprefix: cargo_version_
23
:doctype: manpage
34

45
== NAME

src/doc/man/cargo-yank.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= cargo-yank(1)
2+
:idprefix: cargo_yank_
23
:doctype: manpage
34

45
== NAME

src/doc/src/commands/generated/cargo-bench.html renamed to src/doc/man/generated/cargo-bench.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
<h2 id="_name">NAME</h2>
1+
<h2 id="cargo_bench_name">NAME</h2>
22
<div class="sectionbody">
33
<p>cargo-bench - Execute benchmarks of a package</p>
44
</div>
55
<div class="sect1">
6-
<h2 id="_synopsis">SYNOPSIS</h2>
6+
<h2 id="cargo_bench_synopsis">SYNOPSIS</h2>
77
<div class="sectionbody">
88
<div class="paragraph">
99
<p><code>cargo bench [<em>OPTIONS</em>] [BENCHNAME] [-- <em>BENCH-OPTIONS</em>]</code></p>
1010
</div>
1111
</div>
1212
</div>
1313
<div class="sect1">
14-
<h2 id="_description">DESCRIPTION</h2>
14+
<h2 id="cargo_bench_description">DESCRIPTION</h2>
1515
<div class="sectionbody">
1616
<div class="paragraph">
1717
<p>Compile and execute benchmarks.</p>
@@ -42,10 +42,10 @@ <h2 id="_description">DESCRIPTION</h2>
4242
</div>
4343
</div>
4444
<div class="sect1">
45-
<h2 id="_options">OPTIONS</h2>
45+
<h2 id="cargo_bench_options">OPTIONS</h2>
4646
<div class="sectionbody">
4747
<div class="sect2">
48-
<h3 id="_benchmark_options">Benchmark Options</h3>
48+
<h3 id="cargo_bench_benchmark_options">Benchmark Options</h3>
4949
<div class="dlist">
5050
<dl>
5151
<dt class="hdlist1"><strong>--no-run</strong></dt>
@@ -63,7 +63,7 @@ <h3 id="_benchmark_options">Benchmark Options</h3>
6363
</div>
6464
</div>
6565
<div class="sect2">
66-
<h3 id="_package_selection">Package Selection</h3>
66+
<h3 id="cargo_bench_package_selection">Package Selection</h3>
6767
<div class="paragraph">
6868
<p>By default, when no package selection options are given, the packages selected
6969
depend on the current working directory. In the root of a virtual workspace,
@@ -93,7 +93,7 @@ <h3 id="_package_selection">Package Selection</h3>
9393
</div>
9494
</div>
9595
<div class="sect2">
96-
<h3 id="_target_selection">Target Selection</h3>
96+
<h3 id="cargo_bench_target_selection">Target Selection</h3>
9797
<div class="paragraph">
9898
<p>When no target selection options are given, <code>cargo bench</code> will build the
9999
following targets of the selected packages:</p>
@@ -184,7 +184,7 @@ <h3 id="_target_selection">Target Selection</h3>
184184
</div>
185185
</div>
186186
<div class="sect2">
187-
<h3 id="_feature_selection">Feature Selection</h3>
187+
<h3 id="cargo_bench_feature_selection">Feature Selection</h3>
188188
<div class="paragraph">
189189
<p>When no feature options are given, the <code>default</code> feature is activated for
190190
every selected package.</p>
@@ -210,7 +210,7 @@ <h3 id="_feature_selection">Feature Selection</h3>
210210
</div>
211211
</div>
212212
<div class="sect2">
213-
<h3 id="_compilation_options">Compilation Options</h3>
213+
<h3 id="cargo_bench_compilation_options">Compilation Options</h3>
214214
<div class="dlist">
215215
<dl>
216216
<dt class="hdlist1"><strong>--target</strong> <em>TRIPLE</em></dt>
@@ -258,7 +258,7 @@ <h3 id="_compilation_options">Compilation Options</h3>
258258
</div>
259259
</div>
260260
<div class="sect2">
261-
<h3 id="_output_options">Output Options</h3>
261+
<h3 id="cargo_bench_output_options">Output Options</h3>
262262
<div class="dlist">
263263
<dl>
264264
<dt class="hdlist1"><strong>--target-dir</strong> <em>DIRECTORY</em></dt>
@@ -272,7 +272,7 @@ <h3 id="_output_options">Output Options</h3>
272272
</div>
273273
</div>
274274
<div class="sect2">
275-
<h3 id="_display_options">Display Options</h3>
275+
<h3 id="cargo_bench_display_options">Display Options</h3>
276276
<div class="paragraph">
277277
<p>By default the Rust test harness hides output from benchmark execution to keep
278278
results readable. Benchmark output can be recovered (e.g. for debugging) by
@@ -341,7 +341,7 @@ <h3 id="_display_options">Display Options</h3>
341341
</div>
342342
</div>
343343
<div class="sect2">
344-
<h3 id="_manifest_options">Manifest Options</h3>
344+
<h3 id="cargo_bench_manifest_options">Manifest Options</h3>
345345
<div class="dlist">
346346
<dl>
347347
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
@@ -366,7 +366,7 @@ <h3 id="_manifest_options">Manifest Options</h3>
366366
</div>
367367
</div>
368368
<div class="sect2">
369-
<h3 id="_common_options">Common Options</h3>
369+
<h3 id="cargo_bench_common_options">Common Options</h3>
370370
<div class="dlist">
371371
<dl>
372372
<dt class="hdlist1"><strong>-h</strong></dt>
@@ -383,7 +383,7 @@ <h3 id="_common_options">Common Options</h3>
383383
</div>
384384
</div>
385385
<div class="sect2">
386-
<h3 id="_miscellaneous_options">Miscellaneous Options</h3>
386+
<h3 id="cargo_bench_miscellaneous_options">Miscellaneous Options</h3>
387387
<div class="paragraph">
388388
<p>The <code>--jobs</code> argument affects the building of the benchmark executable but
389389
does not affect how many threads are used when running the benchmarks. The
@@ -404,7 +404,7 @@ <h3 id="_miscellaneous_options">Miscellaneous Options</h3>
404404
</div>
405405
</div>
406406
<div class="sect1">
407-
<h2 id="_profiles">PROFILES</h2>
407+
<h2 id="cargo_bench_profiles">PROFILES</h2>
408408
<div class="sectionbody">
409409
<div class="paragraph">
410410
<p>Profiles may be used to configure compiler options such as optimization levels
@@ -427,7 +427,7 @@ <h2 id="_profiles">PROFILES</h2>
427427
</div>
428428
</div>
429429
<div class="sect1">
430-
<h2 id="_environment">ENVIRONMENT</h2>
430+
<h2 id="cargo_bench_environment">ENVIRONMENT</h2>
431431
<div class="sectionbody">
432432
<div class="paragraph">
433433
<p>See <a href="reference/environment-variables.html">the reference</a> for
@@ -436,7 +436,7 @@ <h2 id="_environment">ENVIRONMENT</h2>
436436
</div>
437437
</div>
438438
<div class="sect1">
439-
<h2 id="_exit_status">Exit Status</h2>
439+
<h2 id="cargo_bench_exit_status">Exit Status</h2>
440440
<div class="sectionbody">
441441
<div class="dlist">
442442
<dl>
@@ -453,7 +453,7 @@ <h2 id="_exit_status">Exit Status</h2>
453453
</div>
454454
</div>
455455
<div class="sect1">
456-
<h2 id="_examples">EXAMPLES</h2>
456+
<h2 id="cargo_bench_examples">EXAMPLES</h2>
457457
<div class="sectionbody">
458458
<div class="olist arabic">
459459
<ol class="arabic">
@@ -478,7 +478,7 @@ <h2 id="_examples">EXAMPLES</h2>
478478
</div>
479479
</div>
480480
<div class="sect1">
481-
<h2 id="_see_also">SEE ALSO</h2>
481+
<h2 id="cargo_bench_see_also">SEE ALSO</h2>
482482
<div class="sectionbody">
483483
<div class="paragraph">
484484
<p><a href="commands/index.html">cargo(1)</a>, <a href="commands/cargo-test.html">cargo-test(1)</a></p>

0 commit comments

Comments
 (0)