Skip to content

Commit 6cf3b0b

Browse files
committed
Auto merge of #23861 - Manishearth:rollup, r=Manishearth
- Successful merges: #23746, #23836, #23852 - Failed merges: #23855
2 parents 9de34a8 + 3b45470 commit 6cf3b0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/trpl/method-syntax.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ parameter, of which there are three variants: `self`, `&self`, and `&mut self`.
5050
You can think of this first parameter as being the `x` in `x.foo()`. The three
5151
variants correspond to the three kinds of thing `x` could be: `self` if it's
5252
just a value on the stack, `&self` if it's a reference, and `&mut self` if it's
53-
a mutable reference. We should default to using `&self`, as it's the most
54-
common, as Rustaceans prefer borrowing over taking ownership, and references
55-
over mutable references. Here's an example of all three variants:
53+
a mutable reference. We should default to using `&self`, as you should prefer
54+
borrowing over taking ownership, as well as taking immutable references
55+
over mutable ones. Here's an example of all three variants:
5656

5757
```rust
5858
struct Circle {

0 commit comments

Comments
 (0)