From 5464d48e90ee3418f814b4a1d3fcfa74b589b94c Mon Sep 17 00:00:00 2001 From: Mick Koch Date: Fri, 3 Jan 2014 13:17:19 -0500 Subject: Fix formatting of some code blocks in pdf docs Code blocks apparently need to be surrounded by whitespace to be output correctly when generating pdfs --- doc/tutorial.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/tutorial.md') diff --git a/doc/tutorial.md b/doc/tutorial.md index b54f80c15a3..9003bf7b23a 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 { -- cgit 1.4.1-3-g733a5