Skip to content

Commit 1fbc992

Browse files
committed
doc (book)[09/14]: "Cargo Guide"/"Package Layout": link terms to glossary
The following term(s) are linked to their Glossary entries: - module - package
1 parent d500dc8 commit 1fbc992

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/doc/src/guide/project-layout.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Package Layout
22

33
Cargo uses conventions for file placement to make it easy to dive into a new
4-
Cargo package:
4+
Cargo [package][def-package]:
55

66
```text
77
.
@@ -44,9 +44,9 @@ Cargo package:
4444
* Integration tests go in the `tests` directory.
4545

4646
If a binary, example, bench, or integration test consists of multiple source
47-
files, place a `main.rs` file along with the extra modules within a
48-
subdirectory of the `src/bin`, `examples`, `benches`, or `tests` directory.
49-
The name of the executable will be the directory name.
47+
files, place a `main.rs` file along with the extra [*modules*][def-module]
48+
within a subdirectory of the `src/bin`, `examples`, `benches`, or `tests`
49+
directory. The name of the executable will be the directory name.
5050

5151
You can learn more about Rust's module system in [the book][book-modules].
5252

@@ -56,4 +56,6 @@ automatically infers target names.
5656

5757
[book-modules]: ../../book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html
5858
[Configuring a target]: ../reference/cargo-targets.md#configuring-a-target
59+
[def-package]: ../appendix/glossary.md#package '"package" (glossary entry)'
60+
[def-module]: ../appendix/glossary.md#module '"module" (glossary entry)'
5961
[Target auto-discovery]: ../reference/cargo-targets.md#target-auto-discovery

0 commit comments

Comments
 (0)