diff options
| author | bors <bors@rust-lang.org> | 2014-01-07 08:26:33 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-07 08:26:33 -0800 |
| commit | 3912a8779e7140f973da15956d54697d3912e0a2 (patch) | |
| tree | 38fa7207c3ebc3c8cc5309ddc5c11fc3142aa127 /doc/tutorial.md | |
| parent | 983f307e123f1da3d351ed2032163bf93ea8f638 (diff) | |
| parent | 5464d48e90ee3418f814b4a1d3fcfa74b589b94c (diff) | |
| download | rust-3912a8779e7140f973da15956d54697d3912e0a2.tar.gz rust-3912a8779e7140f973da15956d54697d3912e0a2.zip | |
auto merge of #11350 : kchmck/rust/fix-pdf-glitches, r=alexcrichton
I was reading through the tutorial and manual pdfs and noticed some of the code blocks have glitches in their formatting:   Putting empty lines around the blocks fixes this. I did a search through the other markdown files and made the change there as well.
Diffstat (limited to 'doc/tutorial.md')
| -rw-r--r-- | doc/tutorial.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md index 2f017c77c0b..067282c12cd 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -2790,6 +2790,7 @@ For example, if we move the `animals` module above into its own file... mod plants; mod animals; ~~~ + ~~~ {.ignore} // src/animals.rs or src/animals/mod.rs mod fish; @@ -2797,6 +2798,7 @@ mod mammals { mod humans; } ~~~ + ...then the source files of `mod animals`'s submodules can either be placed right next to that of its parents, or in a subdirectory if `animals` source file is: @@ -2959,6 +2961,7 @@ pub fn bar() { println("Baz!"); } There also exist two short forms for importing multiple names at once: 1. Explicit mention multiple names as the last element of an `use` path: + ~~~ use farm::{chicken, cow}; # mod farm { @@ -2969,6 +2972,7 @@ use farm::{chicken, cow}; ~~~ 2. Import everything in a module with a wildcard: + ~~~ use farm::*; # mod farm { |
