diff --git a/src/doc/guide-pointers.md b/src/doc/guide-pointers.md index 46564e6712896..948d033e06c03 100644 --- a/src/doc/guide-pointers.md +++ b/src/doc/guide-pointers.md @@ -32,7 +32,7 @@ fn main() { And now I get an error: ~~~ {.notrust} -error: mismatched types: expected `&int` but found `` (expected &-ptr but found integral variable) +error: mismatched types: expected `&int` but found `` (expected &-ptr but found integral variable) ~~~ What gives? It needs a pointer! Therefore I have to use pointers!" @@ -73,7 +73,7 @@ However. Here are the use-cases for pointers. I've prefixed them with the name of the pointer that satisfies that use-case: -1. Owned: ~Trait must be a pointer, because you don't know the size of the +1. Owned: `Box` must be a pointer, because you don't know the size of the object, so indirection is mandatory. 2. Owned: You need a recursive data structure. These can be infinite sized, so indirection is mandatory.