Open
Description
While working on improving method suggestions, it was discovered that the return value of probe_for_return_type
—at least, a slightly altered version thereof that passes ProbeScope::AllTraits
to probe_op
rather than ProbeScope::TraitsInScope
(as on master at issue-filing time)—could include methods that don't actually return the desired type. Most notably, this happened with core::convert::Into::into
.
The root cause seems to be that when we try to resolve type variables, we might find that the return type of the trait method still needs to be resolved, and that unresolved type variable is considered to fulfill the required return type?? (I regret my difficulty to provide a better report than this.)