Skip to content

Commit d500dc8

Browse files
committed
doc (book)[08/14]: "Cargo Guide"/"Dependencies": link terms to glossary
The following term(s) are linked to their Glossary entries: - crate - package - package registry
1 parent d2c181f commit d500dc8

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/doc/src/guide/dependencies.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
## Dependencies
22

3-
[crates.io] is the Rust community's central package registry that serves as a
4-
location to discover and download packages. `cargo` is configured to use it by
5-
default to find requested packages.
3+
[crates.io] is the Rust community's central [*package registry*][def-package-registry]
4+
that serves as a location to discover and download
5+
[packages][def-package]. `cargo` is configured to use it by default to find
6+
requested packages.
67

78
To depend on a library hosted on [crates.io], add it to your `Cargo.toml`.
89

910
[crates.io]: https://crates.io/
1011

1112
### Adding a dependency
1213

13-
If your `Cargo.toml` doesn't already have a `[dependencies]` section, add that,
14-
then list the crate name and version that you would like to use. This example
15-
adds a dependency of the `time` crate:
14+
If your `Cargo.toml` doesn't already have a `[dependencies]` section, add
15+
that, then list the [crate][def-crate] name and version that you would like to
16+
use. This example adds a dependency of the `time` crate:
1617

1718
```toml
1819
[dependencies]
@@ -87,3 +88,7 @@ $ cargo run
8788
Running `target/hello_world`
8889
Did our date match? true
8990
```
91+
92+
[def-crate]: ../appendix/glossary.md#crate '"crate" (glossary entry)'
93+
[def-package]: ../appendix/glossary.md#package '"package" (glossary entry)'
94+
[def-package-registry]: ../appendix/glossary.md#package-registry '"package-registry" (glossary entry)'

0 commit comments

Comments
 (0)