Skip to content

Commit 4f2125b

Browse files
committed
Explain trait object search.
1 parent 3d73f8f commit 4f2125b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/expressions/method-call-expr.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ For each step, the candidate type is used to determine what searches to perform:
6666
impl candidates for the type.
6767
* For a type param, there's a search for inherent candidates on the param.
6868
* For a trait object, there is first a search for inherent candidates for
69-
the object, then inherent impl candidates for the type.
69+
the trait (for example in `impl Trait` blocks), then inherent impl
70+
candidates for the trait object itself (for example found in `impl dyn Trait`
71+
blocks)
7072
* For various simpler types (listed below) there's a search for inherent
7173
candidates for the incoherent type.
7274

0 commit comments

Comments
 (0)