about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-07-20 16:38:45 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-07-20 16:39:20 -0700
commit1615afe7046d7fe9ba3f390a462aecdd96d374cb (patch)
tree08d03bf82815ceb6b71a771e5736104da8bda21c
parent3dc52da989dfa69a6d1abf908610e52c472f871f (diff)
downloadrust-1615afe7046d7fe9ba3f390a462aecdd96d374cb.tar.gz
rust-1615afe7046d7fe9ba3f390a462aecdd96d374cb.zip
Fix failing tutorial test case. Fixes build breakage
-rw-r--r--doc/tutorial.md12
1 files changed, 5 insertions, 7 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md
index ef3004f8cbe..3993d1d6d49 100644
--- a/doc/tutorial.md
+++ b/doc/tutorial.md
@@ -2518,19 +2518,17 @@ interface describes types that support an equality operation:
 
 ~~~~
 iface eq {
-  fn equals(other: self) -> bool;
+  fn equals(&&other: self) -> bool;
 }
-~~~~
-
-In an implementation for type `int`, the `equals` method takes an
-`int` argument:
 
-~~~~
 impl of eq for int {
-  fn equals(other: int) { other == self }
+  fn equals(&&other: int) -> bool { other == self }
 }
 ~~~~
 
+Notice that `equals` takes an `int` argument, rather than a `self` argument, in
+an implementation for type `int`.
+
 ## Casting to an interface type
 
 The above allows us to define functions that polymorphically act on