diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 10:07:47 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 10:07:47 -0700 |
| commit | 5d8a5297dafd4cba47b04b6ccd6ac98d141b89d7 (patch) | |
| tree | d9e08122b23461921bfaf68edd8c2773bbb39241 | |
| parent | 5f9fd2ea27da8e4cec46b8c946a8be65337419bf (diff) | |
| parent | 3e100ff03821e929d6272e17b0b87ecc8ef107f8 (diff) | |
| download | rust-5d8a5297dafd4cba47b04b6ccd6ac98d141b89d7.tar.gz rust-5d8a5297dafd4cba47b04b6ccd6ac98d141b89d7.zip | |
rollup merge of #23747: tshepang/misleading-info
The first sentence was not compatible with the second.
| -rw-r--r-- | src/doc/trpl/method-syntax.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/trpl/method-syntax.md b/src/doc/trpl/method-syntax.md index 8cb16f7ab33..85472ff5db7 100644 --- a/src/doc/trpl/method-syntax.md +++ b/src/doc/trpl/method-syntax.md @@ -46,7 +46,7 @@ This will print `12.566371`. We've made a struct that represents a circle. We then write an `impl` block, and inside it, define a method, `area`. Methods take a special first -parameter, `&self`. There are three variants: `self`, `&self`, and `&mut self`. +parameter, of which there are three variants: `self`, `&self`, and `&mut self`. You can think of this first parameter as being the `x` in `x.foo()`. The three variants correspond to the three kinds of thing `x` could be: `self` if it's just a value on the stack, `&self` if it's a reference, and `&mut self` if it's |
