Skip to content

Commit 08b1c84

Browse files
committed
Rename "to_str" to "make_string" in the docs
There's already a "to_str" impl for string, so it fails here.
1 parent 4c2e4c3 commit 08b1c84

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)