diff options
| author | J. Ryan Stinnett <jryans@gmail.com> | 2015-10-06 00:11:18 -0500 |
|---|---|---|
| committer | J. Ryan Stinnett <jryans@gmail.com> | 2015-10-06 00:11:18 -0500 |
| commit | ed97bcd44aa6dfd33d0fbd618d3343fbe8961c83 (patch) | |
| tree | 8b72c11d7da10c2e617e44a047841b9ce8297f57 /src | |
| parent | bfb26033af68949646081429040db606a044db22 (diff) | |
| download | rust-ed97bcd44aa6dfd33d0fbd618d3343fbe8961c83.tar.gz rust-ed97bcd44aa6dfd33d0fbd618d3343fbe8961c83.zip | |
Complex import example needs blank lines
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/trpl/crates-and-modules.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/doc/trpl/crates-and-modules.md b/src/doc/trpl/crates-and-modules.md index 1c5115117cb..63eccc12b0f 100644 --- a/src/doc/trpl/crates-and-modules.md +++ b/src/doc/trpl/crates-and-modules.md @@ -576,11 +576,13 @@ The third `use` statement bears more explanation. It's using "brace expansion" globbing to compress three `use` statements into one (this sort of syntax may be familiar if you've written Linux shell scripts before). The uncompressed form of this statement would be: + ```rust,ignore use sayings::english; use sayings::english::greetings as en_greetings; use sayings::english::farewells as en_farewells; ``` + As you can see, the curly brackets compress `use` statements for several items under the same path, and in this context `self` just refers back to that path. Note: The curly brackets cannot be nested or mixed with star globbing. |
