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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 1 addition & 6 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 7 additions & 9 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 0 additions & 1 deletion
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

0 commit comments

Comments
 (0)