Auto merge of #28858 - jryans:crate-doc-syntax, r=alexcrichton
Without the blank lines, the content is displayed inline, including the `rust,ignore` syntax hint. r? @steveklabnik
This commit is contained in:
commit
2f60768e84
1 changed files with 2 additions and 0 deletions
|
@ -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
|
globbing to compress three `use` statements into one (this sort of syntax
|
||||||
may be familiar if you've written Linux shell scripts before). The
|
may be familiar if you've written Linux shell scripts before). The
|
||||||
uncompressed form of this statement would be:
|
uncompressed form of this statement would be:
|
||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
use sayings::english;
|
use sayings::english;
|
||||||
use sayings::english::greetings as en_greetings;
|
use sayings::english::greetings as en_greetings;
|
||||||
use sayings::english::farewells as en_farewells;
|
use sayings::english::farewells as en_farewells;
|
||||||
```
|
```
|
||||||
|
|
||||||
As you can see, the curly brackets compress `use` statements for several items
|
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.
|
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.
|
Note: The curly brackets cannot be nested or mixed with star globbing.
|
||||||
|
|
Loading…
Reference in a new issue