diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-01-28 00:48:32 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-01-28 00:48:32 +0530 |
| commit | 5e7dfa7094c8f0e8d892fd489e28edb8c7d0d07e (patch) | |
| tree | 0784d6f8f9b059b616e8895974723fb64cfbec9a | |
| parent | d7c57e1fddb5f6727273f15c3635a5c61b62896d (diff) | |
| parent | 5c61be68d03ebce1912a625661c6fa3cc150b106 (diff) | |
| download | rust-5e7dfa7094c8f0e8d892fd489e28edb8c7d0d07e.tar.gz rust-5e7dfa7094c8f0e8d892fd489e28edb8c7d0d07e.zip | |
Rollup merge of #31226 - steveklabnik:gh30954, r=Manishearth
Fixes #30954
| -rw-r--r-- | src/doc/book/crates-and-modules.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/doc/book/crates-and-modules.md b/src/doc/book/crates-and-modules.md index 849c5f1212a..0c9ed0bf122 100644 --- a/src/doc/book/crates-and-modules.md +++ b/src/doc/book/crates-and-modules.md @@ -567,10 +567,11 @@ to it as "sayings". Similarly, the first `use` statement pulls in the `ja_greetings` as opposed to simply `greetings`. This can help to avoid ambiguity when importing similarly-named items from different places. -The second `use` statement uses a star glob to bring in _all_ symbols from the -`sayings::japanese::farewells` module. As you can see we can later refer to +The second `use` statement uses a star glob to bring in all public symbols from +the `sayings::japanese::farewells` module. As you can see we can later refer to the Japanese `goodbye` function with no module qualifiers. This kind of glob -should be used sparingly. +should be used sparingly. It’s worth noting that it only imports the public +symbols, even if the code doing the globbing is in the same module. The third `use` statement bears more explanation. It's using "brace expansion" globbing to compress three `use` statements into one (this sort of syntax |
