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
Rust prioritizes method candidates in this order:
1. By value;
2. By reference;
3. By mutable reference;
4. By const ptr.
Previously, if a suitable candidate was found in one of these earlier
categories, Rust wouldn't even move onto probing the other categories.
As part of the arbitrary self types work, we're going to need to change
that - even if we choose a method from one of the earlier categories, we
will sometimes need to probe later categories to search for methods that
we may be shadowing.
This commit adds those extra searches for shadowing, but it does not yet
produce an error when such shadowing problems are found. That will come
in a subsequent commit, by filling out the 'check_for_shadowing'
method.
We're adding the extra searches in a preliminary commit because they are
the risky bit. We want to find any functional or performance problems
from these extra searches before we proceed with the actual work on
arbitrary self types and specifically on extra deshadowing errors.
0 commit comments