Skip to content

Commit 8938c4b

Browse files
authored
Merge pull request #2139 from rust-lang/tmandry-patch-2
Clarify only arrays undergo unsized coercion during dispatch
2 parents 828d2ba + 8f3bc72 commit 8938c4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/expressions/method-call-expr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ r[expr.method.autoref-deref]
2222
When looking up a method call, the receiver may be automatically dereferenced or borrowed in order to call a method. This requires a more complex lookup process than for other functions, since there may be a number of possible methods to call. The following procedure is used:
2323

2424
r[expr.method.candidate-receivers]
25-
The first step is to build a list of candidate receiver types. Obtain these by repeatedly [dereferencing][dereference] the receiver expression's type, adding each type encountered to the list, then finally attempting an [unsized coercion] at the end, and adding the result type if that is successful.
25+
The first step is to build a list of candidate receiver types. Obtain these by repeatedly [dereferencing][dereference] the receiver expression's type, adding each type encountered to the list, then finally attempting an array [unsized coercion] at the end, and adding the result type if that is successful.
2626

2727
r[expr.method.candidate-receivers-refs]
2828
Then, for each candidate `T`, add `&T` and `&mut T` to the list immediately after `T`.

0 commit comments

Comments
 (0)