Skip to content

Commit 6f7dc05

Browse files
committed
---
yaml --- r: 6185 b: refs/heads/master c: 369fc5e h: refs/heads/master i: 6183: e0187c6 v: v3
1 parent b2b20d8 commit 6f7dc05

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 9375204461a98e2537b4aafc3f779405516b51ec
2+
refs/heads/master: 369fc5e4802ec618ba10a52cf52fa52069fa5e77

trunk/doc/rust.texi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ and compiled crates have a 1:1 relationship.
10311031
The syntactic form of a crate is a sequence of @emph{directives}, some of
10321032
which have nested sub-directives.
10331033

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,
10351035
all members of the crate have canonical path names. @xref{Ref.Path}. The
10361036
@code{mod} directives within a crate file specify sub-modules to include in
10371037
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
10401040
become prefixes of the paths of items defined within any included Rust source
10411041
files.
10421042

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+
10431050
The @code{use} directives within the crate specify @emph{other crates} to scan
10441051
for, locate, import into the crate's module namespace during compilation, and
10451052
link against at runtime. Use directives may also occur independently in rust

0 commit comments

Comments
 (0)