Skip to content

Commit

Permalink
Merge pull request #4181 from andrew-d/andrew-doc-fix1
Browse files Browse the repository at this point in the history
Fix example in docs
  • Loading branch information
brson committed Dec 14, 2012
2 parents 885bdf7 + 08b1c84 commit 55c9cf7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -2719,18 +2719,18 @@ The special type `self` has a meaning within methods inside an
impl item. It refers to the type of the implicit `self` argument. For
example, in:

~~~~~~~~{.xfail-test}
~~~~~~~~
trait Printable {
fn to_str() -> ~str;
fn make_string() -> ~str;
}
impl ~str: Printable {
fn to_str() -> ~str { copy self }
fn make_string() -> ~str { copy self }
}
~~~~~~~~

`self` refers to the value of type `~str` that is the receiver for a
call to the method `to_str`.
call to the method `make_string`.

## Type kinds

Expand Down

0 comments on commit 55c9cf7

Please sign in to comment.