Skip to content

Commit 3f6cc44

Browse files
committed
Add "module" to glossary.
1 parent 902cef0 commit 3f6cc44

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: src/glossary.md

+9
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ This is not affected by applied type arguments. `struct Foo` is considered local
140140
`Vec<Foo>` is not. `LocalType<ForeignType>` is local. Type aliases do not
141141
affect locality.
142142

143+
### Module
144+
145+
A module is a container for zero or more [items]. Modules are organized in a
146+
tree, starting from an unnamed module at the root called the crate root or the
147+
root module. [Paths] may be used to refer to items outside of a module, which
148+
may be restricted by [visibility rules].
149+
[More][modules]
150+
143151
### Name
144152

145153
A [*name*] is an [identifier] or [lifetime or loop label] that refers to an
@@ -320,3 +328,4 @@ example of an uninhabited type is the [never type] `!`, or an enum with no varia
320328
[undefined-behavior]: behavior-considered-undefined.md
321329
[unions]: items/unions.md
322330
[variable bindings]: patterns.md
331+
[visibility rules]: visibility-and-privacy.md

0 commit comments

Comments
 (0)