about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-12-11 13:43:14 -0800
committerGraydon Hoare <graydon@mozilla.com>2012-12-11 13:43:14 -0800
commit645bd98b602500ef910685eeeb899df298221e35 (patch)
tree23740cdaaf1345737e11f1ea93efc4bc785a6c2b /doc
parentfb498ff59f3de4da58d9f6e90fd989482c901fc5 (diff)
downloadrust-645bd98b602500ef910685eeeb899df298221e35.tar.gz
rust-645bd98b602500ef910685eeeb899df298221e35.zip
doc: add missing decls to example, r=burningtree.
Diffstat (limited to 'doc')
-rw-r--r--doc/tutorial.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md
index b58ba6c3222..b7a07f4021a 100644
--- a/doc/tutorial.md
+++ b/doc/tutorial.md
@@ -1838,6 +1838,8 @@ combination of arguments of the appropriate types. The usual way is to write
 a function that returns `Option<T>` instead of `T`.
 
 ~~~~
+# struct Point {x: float, y: float}
+# enum Shape { Circle(Point, float), Rectangle(Point, Point) }
 fn radius(shape: Shape) -> Option<float> {
    match shape {
        Circle(_, radius) => Some(radius),