Rollup merge of #37228 - loggerhead:patch-1, r=steveklabnik

Fix a error of 'book/deref-coercions.html'

The original sentence is:

> This example has two conversions: `Rc<String>` to `String` and then `String` to `&str`.

But it should be

> This example has two conversions: `Rc<String>` to `String` and then `String` to `str`.

or

> This example has two conversions: `&Rc<String>` to `&String` and then `&String` to `&str`.

I think the latter is more clearly.

r? @steveklabnik
This commit is contained in:
Jonathan Turner 2016-10-24 15:41:28 -07:00 committed by GitHub
commit 91c7a8270b
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ foo(&counted);
All weve done is wrap our `String` in an `Rc<T>`. But we can now pass the
`Rc<String>` around anywhere wed have a `String`. The signature of `foo`
didnt change, but works just as well with either type. This example has two
conversions: `Rc<String>` to `String` and then `String` to `&str`. Rust will do
conversions: `&Rc<String>` to `&String` and then `&String` to `&str`. Rust will do
this as many times as possible until the types match.
Another very common implementation provided by the standard library is: