Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/expressions/method-call-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ Then, for each candidate type `T`, search for a [visible] method with a receiver
r[expr.method.ambiguous-target]
If this results in multiple possible candidates, then it is an error, and the receiver must be [converted][disambiguate call] to an appropriate receiver type to make the method call.

r[expr.method.supertrait-shadowing]
As an exception to the above, if all candidates consist of trait methods and one candidate is a sub-trait of all other candidates then that candidate is selected instead of causing an ambiguity error.

r[expr.method.receiver-constraints]
This process does not take into account the mutability or lifetime of the receiver, or whether a method is `unsafe`. Once a method is looked up, if it can't be called for one (or more) of those reasons, the result is a compiler error.

Expand Down