diff options
| author | Jonathan Turner <jonathandturner@users.noreply.github.com> | 2016-10-24 15:41:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-24 15:41:28 -0700 |
| commit | 91c7a8270b354467b99018d7ea01ac59b22ac067 (patch) | |
| tree | b072b4e13368a89f875e221fd4caec1e69512468 /src | |
| parent | 7bd2427307018a68e0b77438bbe40d339a54e587 (diff) | |
| parent | 0d3bdc6c3ec9b237f986bd4b233764f36b8c5bda (diff) | |
| download | rust-91c7a8270b354467b99018d7ea01ac59b22ac067.tar.gz rust-91c7a8270b354467b99018d7ea01ac59b22ac067.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/book/deref-coercions.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/book/deref-coercions.md b/src/doc/book/deref-coercions.md index beb65c4ce35..cabe66f5b22 100644 --- a/src/doc/book/deref-coercions.md +++ b/src/doc/book/deref-coercions.md @@ -69,7 +69,7 @@ foo(&counted); All we’ve done is wrap our `String` in an `Rc<T>`. But we can now pass the `Rc<String>` around anywhere we’d have a `String`. The signature of `foo` didn’t 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: |
