You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first step is to build a list of candidate receiver types. Obtain these by repeatedly dereferencing 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.
However, general unsized coercions are not allowed for method call. In particular, this example shows unsized coercion to a trait object is not performed during method lookup. It seems it was mentioned when this paragraph of the reference was written that the unsized coercion is only performed for slices, but it does not seem to have been changed accordingly. It would be good if it could be fixed to reflect what actually happens during method lookup, and if we could clarify whether slices are truly a special case.
The text was updated successfully, but these errors were encountered:
CC @matthewjasper@Havvy: The issue to be accurate about which unsizing coercions apply that you requested in PR #190 was never created, but this issue could serve as that. It continues to cause confusion. It is a counter-factual statement in the reference.
(Not sure if bots patrol these parts but let's try...) @rustbot label +Bug +T-lang
When explaining method lookup, the reference says:
However, general unsized coercions are not allowed for method call. In particular, this example shows unsized coercion to a trait object is not performed during method lookup. It seems it was mentioned when this paragraph of the reference was written that the unsized coercion is only performed for slices, but it does not seem to have been changed accordingly. It would be good if it could be fixed to reflect what actually happens during method lookup, and if we could clarify whether slices are truly a special case.
The text was updated successfully, but these errors were encountered: