Skip to content

Commit 042ebac

Browse files
committed
extern crate and mod are not easily confused
Remove some statements that used to refer to similarities between `mod` and `extern mod`, before the latter was renamed to `extern crate`.
1 parent 3786b55 commit 042ebac

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/doc/tutorial.md

-3
Original file line numberDiff line numberDiff line change
@@ -2600,8 +2600,6 @@ As you can see, your module hierarchy is now three modules deep: There is the cr
26002600
function, and the module `farm`. The module `farm` also contains two functions and a third module `barn`,
26012601
which contains a function `hay`.
26022602

2603-
(In case you already stumbled over `extern crate`: It isn't directly related to a bare `mod`, we'll get to it later. )
2604-
26052603
## Paths and visibility
26062604

26072605
We've now defined a nice module hierarchy. But how do we access the items in it from our `main` function?
@@ -3050,7 +3048,6 @@ fn main() {
30503048
}
30513049
~~~
30523050

3053-
Despite its name, `extern crate` is a distinct construct from regular `mod` declarations:
30543051
A statement of the form `extern crate foo;` will cause `rustc` to search for the crate `foo`,
30553052
and if it finds a matching binary it lets you use it from inside your crate.
30563053

0 commit comments

Comments
 (0)