From 0204c1faf63990f3151bc44efb156e1a4e413581 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sat, 27 Dec 2014 11:32:25 +1100 Subject: [PATCH] Remove some `ignore`s from the guide. --- src/doc/guide.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/doc/guide.md b/src/doc/guide.md index 22cbd18a8652..bb6fcea32acb 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -482,7 +482,7 @@ src/main.rs:2 let x; Giving it a type will compile, though: -```{ignore} +```{rust} let x: int; ``` @@ -1044,7 +1044,9 @@ struct Point(int, int, int); These two will not be equal, even if they have the same values: -```{rust,ignore} +```{rust} +# struct Color(int, int, int); +# struct Point(int, int, int); let black = Color(0, 0, 0); let origin = Point(0, 0, 0); ``` @@ -4290,7 +4292,9 @@ let square = |x: int| { x * x }; We've seen this before. We make a closure that takes an integer, and returns its square. -```{rust,ignore} +```{rust} +# fn twice(x: int, f: |int| -> int) -> int { f(x) + f(x) } +# let square = |x: int| { x * x }; twice(5i, square); // evaluates to 50 ```