Skip to content

Commit 82e9bd4

Browse files
committed
Fix link and image reference definitions and remove unused link and image reference definitions
1 parent 730d997 commit 82e9bd4

19 files changed

+32
-63
lines changed

src/doc/src/guide/cargo-toml-vs-cargo-lock.md

-1
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,3 @@ that the argument to `cargo update` is actually a
101101
short specification.
102102

103103
[def-manifest]: ../appendix/glossary.md#manifest '"manifest" (glossary entry)'
104-
[def-package]: ../appendix/glossary.md#package '"package" (glossary entry)'

src/doc/src/reference/build-scripts.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ one detailed below.
128128
* [`cargo::rustc-env=VAR=VALUE`](#rustc-env) --- Sets an environment variable.
129129
* [`cargo::rustc-cdylib-link-arg=FLAG`](#rustc-cdylib-link-arg) --- Passes custom
130130
flags to a linker for cdylib crates.
131-
- [`cargo::error=MESSAGE`](#cargo-error) --- Displays an error on the terminal.
131+
* [`cargo::error=MESSAGE`](#cargo-error) --- Displays an error on the terminal.
132132
* [`cargo::warning=MESSAGE`](#cargo-warning) --- Displays a warning on the
133133
terminal.
134134
* [`cargo::metadata=KEY=VALUE`](#the-links-manifest-key) --- Metadata, used by `links`
@@ -439,11 +439,11 @@ key-value pairs. This metadata is set with the `cargo::metadata=KEY=VALUE`
439439
instruction.
440440

441441
The metadata is passed to the build scripts of **dependent** packages. For
442-
example, if the package `foo` depends on `bar`, which links `baz`, then if
442+
example, if the package `foo` depends on `bar`, which links `baz`, then if
443443
`bar` generates `key=value` as part of its build script metadata, then the
444444
build script of `foo` will have the environment variables `DEP_BAZ_KEY=value`
445445
(note that the value of the `links` key is used).
446-
See the ["Using another `sys` crate"][using-another-sys] for an example of
446+
See the ["Using another `sys` crate"][using-another-sys] for an example of
447447
how this can be used.
448448

449449
Note that metadata is only passed to immediate dependents, not transitive

src/doc/src/reference/cargo-targets.md

-2
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ name = "my-pg-tool"
313313
required-features = ["postgres", "tools"]
314314
```
315315

316-
317316
## Target auto-discovery
318317

319318
By default, Cargo automatically determines the targets to build based on the
@@ -379,7 +378,6 @@ autobins = false
379378
[`cargo test`]: ../commands/cargo-test.md
380379
[cfg-test]: ../../reference/conditional-compilation.html#test
381380
[crate types]: ../../reference/linkage.html
382-
[crates.io]: https://crates.io/
383381
[customized]: #configuring-a-target
384382
[dependencies]: specifying-dependencies.md
385383
[dev-dependencies]: specifying-dependencies.md#development-dependencies

src/doc/src/reference/environment-variables.md

-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ In summary, the supported environment variables are:
163163
[`build.incremental`]: config.md#buildincremental
164164
[`build.dep-info-basedir`]: config.md#builddep-info-basedir
165165
[`doc.browser`]: config.md#docbrowser
166-
[`cargo-new.name`]: config.md#cargo-newname
167-
[`cargo-new.email`]: config.md#cargo-newemail
168166
[`cargo-new.vcs`]: config.md#cargo-newvcs
169167
[`future-incompat-report.frequency`]: config.md#future-incompat-reportfrequency
170168
[`http.debug`]: config.md#httpdebug

src/doc/src/reference/external-tools.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ facilities:
1212

1313
* support for custom subcommands.
1414

15-
1615
## Information about package structure
1716

1817
You can use [`cargo metadata`] command to get information about package
@@ -63,7 +62,6 @@ messages.
6362
> **MSRV:** 1.77 is required for `package_id` to be a Package ID Specification. Before that, it was opaque.
6463
6564
[build command documentation]: ../commands/cargo-build.md
66-
[cargo_metadata]: https://crates.io/crates/cargo_metadata
6765
[Package ID Specifications]: ./pkgid-spec.md
6866

6967
### Compiler messages
@@ -303,7 +301,4 @@ approach has drawbacks:
303301
304302
Instead, it is encouraged to use the CLI interface to drive Cargo. The [`cargo
305303
metadata`] command can be used to obtain information about the current project
306-
(the [`cargo_metadata`] crate provides a Rust interface to this command).
307-
308-
[`cargo metadata`]: ../commands/cargo-metadata.md
309-
[`cargo_metadata`]: https://crates.io/crates/cargo_metadata
304+
(the [cargo_metadata] crate provides a Rust interface to this command).

src/doc/src/reference/features-examples.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Some packages provide bindings to common C libraries (sometimes referred to as
9090
C library installed on the system, or to build it from source. For example,
9191
the [`openssl`] package has a [`vendored` feature][openssl-vendored] which
9292
enables the corresponding `vendored` feature of [`openssl-sys`]. The
93-
`openssl-sys` build script has some [conditional logic][openssl-sys-cfg] which
93+
`openssl-sys` [build script] has some [conditional logic][openssl-sys-cfg] which
9494
causes it to build from a local copy of the OpenSSL source code instead of
9595
using the version from the system.
9696

@@ -162,7 +162,6 @@ features.
162162
The [`simd_support` feature][rand-simd_support] of the [`rand`] package is another example,
163163
which relies on a dependency that only builds on the nightly channel.
164164

165-
[`wasm-bindgen`]: https://crates.io/crates/wasm-bindgen
166165
[nightly channel]: ../../book/appendix-07-nightly-rust.html
167166
[wasm-bindgen-nightly]: https://github.com/rustwasm/wasm-bindgen/blob/0.2.69/Cargo.toml#L27
168167
[wasm-bindgen-unsize]: https://github.com/rustwasm/wasm-bindgen/blob/0.2.69/src/closure.rs#L257-L269

src/doc/src/reference/manifest.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ a keyword. [crates.io] imposes even more restrictions, such as:
9191

9292
### The `version` field
9393

94-
The `version` field is formatted according to the [SemVer] specification:
94+
The `version` field is formatted according to the [Semantic Versioning] specification:
9595

9696
Versions must have three numeric parts,
9797
the major version, the minor version, and the patch version.
@@ -105,18 +105,18 @@ For example, `1.0.0-alpha.11` is higher than `1.0.0-alpha.4`.
105105
A metadata part can be added after a plus, such as `1.0.0+21AF26D3`.
106106
This is for informational purposes only and is generally ignored by Cargo.
107107

108-
Cargo bakes in the concept of [Semantic Versioning](https://semver.org/),
109-
so versions are considered considered [compatible](semver.md) if their left-most non-zero major/minor/patch component is the same.
110-
See the [Resolver] chapter for more information on how Cargo uses versions to
111-
resolve dependencies.
108+
Cargo bakes in the concept of [Semantic Versioning], so versions are considered
109+
[compatible] if their left-most non-zero major/minor/patch component is the
110+
same. See the [Resolver] chapter for more information on how Cargo uses
111+
versions to resolve dependencies.
112112

113113
This field is optional and defaults to `0.0.0`. The field is required for publishing packages.
114114

115115
> **MSRV:** Before 1.75, this field was required
116116
117-
[SemVer]: https://semver.org
117+
[Semantic Versioning]: https://semver.org
118118
[Resolver]: resolver.md
119-
[SemVer compatibility]: semver.md
119+
[compatible]: semver.md
120120

121121
### The `authors` field
122122

@@ -612,8 +612,6 @@ The `[profile]` tables provide a way to customize compiler settings such as
612612
optimizations and debug settings. See [the Profiles chapter](profiles.md) for
613613
more detail.
614614

615-
616-
617615
[`cargo init`]: ../commands/cargo-init.md
618616
[`cargo new`]: ../commands/cargo-new.md
619617
[`cargo package`]: ../commands/cargo-package.md

src/doc/src/reference/overriding-dependencies.md

-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ changes.
353353
> crates that have been published to [crates.io]. You cannot use this feature
354354
> to tell Cargo how to find local unpublished crates.
355355
356-
357356
[crates.io]: https://crates.io/
358357
[multiple locations]: specifying-dependencies.md#multiple-locations
359358
[dependencies]: specifying-dependencies.md

src/doc/src/reference/profiles.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -382,18 +382,18 @@ The profile used depends on the command, the command-line flags like
382382
| Command | Default Profile |
383383
|---------|-----------------|
384384
| [`cargo run`], [`cargo build`],<br>[`cargo check`], [`cargo rustc`] | [`dev` profile](#dev) |
385-
| [`cargo test`] | [`test` profile](#test)
386-
| [`cargo bench`] | [`bench` profile](#bench)
387-
| [`cargo install`] | [`release` profile](#release)
385+
| [`cargo test`] | [`test` profile](#test) |
386+
| [`cargo bench`] | [`bench` profile](#bench) |
387+
| [`cargo install`] | [`release` profile](#release) |
388388

389389
You can switch to a different profile using the `--profile=NAME` option which will used the given profile.
390390
The `--release` flag is equivalent to `--profile=release`.
391391

392-
The selected profile applies to all Cargo targets,
392+
The selected profile applies to all Cargo targets,
393393
including [library](./cargo-targets.md#library),
394-
[binary](./cargo-targets.md#binaries),
395-
[example](./cargo-targets.md#examples),
396-
[test](./cargo-targets.md#tests),
394+
[binary](./cargo-targets.md#binaries),
395+
[example](./cargo-targets.md#examples),
396+
[test](./cargo-targets.md#tests),
397397
and [benchmark](./cargo-targets.md#benchmarks).
398398

399399
The profile for specific packages can be specified with

src/doc/src/reference/publishing.md

-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ request the org owner to do so.
285285
[`cargo publish`]: ../commands/cargo-publish.md
286286
[`categories`]: manifest.md#the-categories-field
287287
[`description`]: manifest.md#the-description-field
288-
[`documentation`]: manifest.md#the-documentation-field
289288
[`homepage`]: manifest.md#the-homepage-field
290289
[`keywords`]: manifest.md#the-keywords-field
291290
[`license` or `license-file`]: manifest.md#the-license-and-license-file-fields

src/doc/src/reference/registries.md

-2
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,11 @@ controlled via the [`registries.crates-io.protocol`] config key.
124124
[Credential Provider Protocol]: credential-provider-protocol.md
125125
[Registry Authentication]: registry-authentication.md
126126
[`cargo publish`]: ../commands/cargo-publish.md
127-
[`cargo package`]: ../commands/cargo-package.md
128127
[`cargo login`]: ../commands/cargo-login.md
129128
[config]: config.md
130129
[crates.io]: https://crates.io/
131130
[`registries.crates-io.protocol`]: config.md#registriescrates-ioprotocol
132131

133-
134132
<script>
135133
(function() {
136134
var fragments = {

src/doc/src/reference/registry-index.md

-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ The keys are:
3939
all operations to be authenticated including API requests, crate downloads
4040
and sparse index updates.
4141

42-
4342
## Download Endpoint
4443
The download endpoint should send the `.crate` file for the requested package.
4544
Cargo supports https, http, and file URLs, HTTP redirects, HTTP1 and HTTP2.
@@ -319,7 +318,6 @@ the equivalent git URL when the sparse protocol is used.
319318
If a registry does offer both protocols, it's currently recommended to choose one protocol
320319
as the canonical protocol and use [source replacement] for the other protocol.
321320

322-
323321
[`cargo publish`]: ../commands/cargo-publish.md
324322
[alphanumeric]: ../../std/primitive.char.html#method.is_alphanumeric
325323
[crates.io]: https://crates.io/

src/doc/src/reference/registry-web-api.md

-4
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,5 @@ The "login" endpoint is not an actual API request. It exists solely for the
354354
browser to log in and retrieve an API token.
355355

356356
[`cargo login`]: ../commands/cargo-login.md
357-
[`cargo package`]: ../commands/cargo-package.md
358-
[`cargo publish`]: ../commands/cargo-publish.md
359-
[alphanumeric]: ../../std/primitive.char.html#method.is_alphanumeric
360-
[config]: config.md
361357
[crates.io]: https://crates.io/
362358
[publishing documentation]: publishing.md#cargo-owner

src/doc/src/reference/resolver.md

-4
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,6 @@ situations:
390390

391391
[build-dependencies]: specifying-dependencies.md#build-dependencies
392392
[dev-dependencies]: specifying-dependencies.md#development-dependencies
393-
[resolver-field]: features.md#resolver-versions
394393

395394
### `links`
396395

@@ -466,7 +465,6 @@ all platforms are enabled. In other words, the resolver ignores the platform
466465
or `cfg` expression.
467466

468467
[build]: specifying-dependencies.md#build-dependencies
469-
[dev-dependencies]: specifying-dependencies.md#development-dependencies
470468
[Platform-specific dependencies]: specifying-dependencies.md#platform-specific-dependencies
471469

472470
### dev-dependency cycles
@@ -647,8 +645,6 @@ The use of open-ended version requirements like `>=0.6` is discouraged in Cargo.
647645
But, if you run into this situation, the [`cargo update`] command with the
648646
`--precise` flag can be used to manually remove such duplications.
649647

650-
[`cargo update`]: ../commands/cargo-update.md
651-
652648
### Why wasn't a newer version selected?
653649

654650
Say you noticed that the latest version of a dependency wasn't selected when you ran:

src/doc/src/reference/running-a-registry.md

-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ for a list of what is available.
1616

1717
[Registry Web API]: registry-web-api.md
1818
[Registry Index]: registry-index.md
19-
[`cargo publish`]: ../commands/cargo-publish.md
2019
[`cargo package`]: ../commands/cargo-package.md

src/doc/src/reference/semver.md

-1
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,6 @@ document what your commitments are.
23102310
[items]: ../../reference/items.html
23112311
[non_exhaustive]: ../../reference/attributes/type_system.html#the-non_exhaustive-attribute
23122312
[object safe]: ../../reference/items/traits.html#object-safety
2313-
[rust-feature]: https://doc.rust-lang.org/nightly/unstable-book/
23142313
[sealed trait]: https://rust-lang.github.io/api-guidelines/future-proofing.html#sealed-traits-protect-against-downstream-implementations-c-sealed
23152314
[SemVer]: https://semver.org/
23162315
[struct literal]: ../../reference/expressions/struct-expr.html

src/doc/src/reference/specifying-dependencies.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This is different from [SemVer] which considers all pre-1.0.0 packages to be inc
5050

5151
### Caret requirements
5252

53-
**Caret requirements** are the default version requirement strategy.
53+
**Caret requirements** are the default version requirement strategy.
5454
This version strategy allows [SemVer] compatible updates.
5555
They are specified as version requirements with a leading caret (`^`).
5656

@@ -213,7 +213,7 @@ regex = { git = "https://github.com/rust-lang/regex.git" }
213213
```
214214

215215
Cargo fetches the `git` repository at that location and traverses the file tree to find
216-
`Cargo.toml` file for the requested crate anywhere inside the `git` repository.
216+
`Cargo.toml` file for the requested crate anywhere inside the `git` repository.
217217
For example, `regex-lite` and `regex-syntax` are members of `rust-lang/regex` repo
218218
and can be referred to by the repo's root URL (`https://github.com/rust-lang/regex.git`)
219219
regardless of where in the file tree they reside.
@@ -240,7 +240,7 @@ regex = { git = "https://github.com/rust-lang/regex.git", branch = "next" }
240240

241241
Anything that is not a branch or a tag falls under `rev` key. This can be a commit
242242
hash like `rev = "4c59b707"`, or a named reference exposed by the remote
243-
repository such as `rev = "refs/pull/493/head"`.
243+
repository such as `rev = "refs/pull/493/head"`.
244244

245245
What references are available for the `rev` key varies by where the repo is hosted.
246246
GitHub exposes a reference to the most recent commit of every pull request as in the example above.
@@ -280,7 +280,7 @@ The `version` key always implies that the package is available in a registry,
280280
regardless of the presence of `git` or `path` keys.
281281

282282
The `version` key does _not_ affect which commit is used when Cargo retrieves the `git` dependency,
283-
but Cargo checks the version information in the dependency's `Cargo.toml` file
283+
but Cargo checks the version information in the dependency's `Cargo.toml` file
284284
against the `version` key and raises an error if the check fails.
285285

286286
In this example, Cargo retrieves the HEAD commit of the branch called `next` from Git and checks if the crate's version
@@ -291,7 +291,7 @@ is compatible with `version = "1.10.3"`:
291291
regex = { version = "1.10.3", git = "https://github.com/rust-lang/regex.git", branch = "next" }
292292
```
293293

294-
`version`, `git`, and `path` keys are considered separate locations for resolving the dependency.
294+
`version`, `git`, and `path` keys are considered separate locations for resolving the dependency.
295295
See [Multiple locations](#multiple-locations) section below for detailed explanations.
296296

297297
> **Note**: [crates.io] does not allow packages to be published with
@@ -519,7 +519,6 @@ manifest:
519519
cc = "1.0.3"
520520
```
521521

522-
523522
You can also have target-specific build dependencies by using
524523
`build-dependencies` in the target section header instead of `dependencies`. For
525524
example:
@@ -647,7 +646,6 @@ cc.workspace = true
647646
rand = { workspace = true, optional = true }
648647
```
649648

650-
651649
[SemVer]: https://semver.org
652650
[crates.io]: https://crates.io/
653651
[dev-dependencies]: #development-dependencies

src/doc/src/reference/timings.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Reporting build timings
2+
23
The `--timings` option gives some information about how long each compilation
34
takes, and tracks concurrency information over time.
45

@@ -12,20 +13,20 @@ filename, if you want to look at older runs.
1213

1314
## Reading the graphs
1415

15-
There are two tables and two graphs in the output.
16+
There are two tables and two graphs in the output.
1617

17-
The first table displays the build information of the project, including the
18-
number of units built, the maximum number of concurrency, build time, and the
18+
The first table displays the build information of the project, including the
19+
number of units built, the maximum number of concurrency, build time, and the
1920
version information of the currently used compiler.
2021

2122
![build-info](../images/build-info.png)
2223

2324
The "unit" graph shows the duration of each unit over time. A "unit" is a single
24-
compiler invocation. There are lines that show which additional units are
25-
"unlocked" when a unit finishes. That is, it shows the new units that are now
25+
compiler invocation. There are lines that show which additional units are
26+
"unlocked" when a unit finishes. That is, it shows the new units that are now
2627
allowed to run because their dependencies are all finished. Hover the mouse over
27-
a unit to highlight the lines. This can help visualize the critical path of
28-
dependencies. This may change between runs because the units may finish in
28+
a unit to highlight the lines. This can help visualize the critical path of
29+
dependencies. This may change between runs because the units may finish in
2930
different orders.
3031

3132
The "codegen" times are highlighted in a lavender color. In some cases, build

src/doc/src/reference/unstable.md

-1
Original file line numberDiff line numberDiff line change
@@ -1992,4 +1992,3 @@ about specifying custom cfgs.
19921992
The 2024 edition has been stabilized in the 1.85 release.
19931993
See the [`edition` field](manifest.md#the-edition-field) for more information on setting the edition.
19941994
See [`cargo fix --edition`](../commands/cargo-fix.md) and [The Edition Guide](../../edition-guide/index.html) for more information on migrating existing projects.
1995-

0 commit comments

Comments
 (0)