@@ -1031,7 +1031,7 @@ and compiled crates have a 1:1 relationship.
1031
1031
The syntactic form of a crate is a sequence of @emph {directives }, some of
1032
1032
which have nested sub-directives.
1033
1033
1034
- A crate defines an implicit top-level anonymous module: within this module,
1034
+ A crate defines an implicit top-level module: within this module,
1035
1035
all members of the crate have canonical path names. @xref {Ref.Path }. The
1036
1036
@code {mod } directives within a crate file specify sub-modules to include in
1037
1037
the crate: these are either directory modules, corresponding to directories in
@@ -1040,6 +1040,13 @@ to Rust source files. The names given to such modules in @code{mod} directives
1040
1040
become prefixes of the paths of items defined within any included Rust source
1041
1041
files.
1042
1042
1043
+ If a .rs file exists in the filesystem alongside the .rc crate file, then it
1044
+ will be used to provide the top-level module of the crate. Similarly,
1045
+ directory modules may be paired with .rs files of the same name as the
1046
+ directory to provide the code for those modules. These source files are never
1047
+ mentioned explicitly in the crate file; they are simply used if they are
1048
+ present.
1049
+
1043
1050
The @code {use } directives within the crate specify @emph {other crates } to scan
1044
1051
for, locate, import into the crate's module namespace during compilation, and
1045
1052
link against at runtime. Use directives may also occur independently in rust
0 commit comments