about summary refs log tree commit diff
path: root/doc/tutorial.md
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-12 19:32:14 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-03-13 20:07:10 -0700
commit8fa66e8e07ca565119de195ceefb20cff50ae1ea (patch)
treef9ae9910b40b04ae62daff56b8de1ae002765d2e /doc/tutorial.md
parenta410652bc953137c8d579f218c2e3e68a9ef8c1c (diff)
librustc: Remove implicit self from the language, except for old-style drop blocks.
Diffstat (limited to 'doc/tutorial.md')
-rw-r--r--doc/tutorial.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md
index 3fa53abf6b9..3e7b9400e17 100644
--- a/doc/tutorial.md
+++ b/doc/tutorial.md
@@ -1135,7 +1135,7 @@ can sometimes make code awkward and parenthesis-filled.
 ~~~
 # struct Point { x: float, y: float }
 # enum Shape { Rectangle(Point, Point) }
-# impl Shape { fn area() -> int { 0 } }
+# impl Shape { fn area(&self) -> int { 0 } }
 let start = @Point { x: 10f, y: 20f };
 let end = ~Point { x: (*start).x + 100f, y: (*start).y + 100f };
 let rect = &Rectangle(*start, *end);
@@ -1149,7 +1149,7 @@ dot), so in most cases, explicitly dereferencing the receiver is not necessary.
 ~~~
 # struct Point { x: float, y: float }
 # enum Shape { Rectangle(Point, Point) }
-# impl Shape { fn area() -> int { 0 } }
+# impl Shape { fn area(&self) -> int { 0 } }
 let start = @Point { x: 10f, y: 20f };
 let end = ~Point { x: start.x + 100f, y: start.y + 100f };
 let rect = &Rectangle(*start, *end);