Skip to content

Commit 55c9cf7

Browse files
committed
Merge pull request #4181 from andrew-d/andrew-doc-fix1
Fix example in docs
2 parents 885bdf7 + 08b1c84 commit 55c9cf7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/rust.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2719,18 +2719,18 @@ The special type `self` has a meaning within methods inside an
27192719
impl item. It refers to the type of the implicit `self` argument. For
27202720
example, in:
27212721

2722-
~~~~~~~~{.xfail-test}
2722+
~~~~~~~~
27232723
trait Printable {
2724-
fn to_str() -> ~str;
2724+
fn make_string() -> ~str;
27252725
}
27262726
27272727
impl ~str: Printable {
2728-
fn to_str() -> ~str { copy self }
2728+
fn make_string() -> ~str { copy self }
27292729
}
27302730
~~~~~~~~
27312731

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

27352735
## Type kinds
27362736

0 commit comments

Comments
 (0)