Open maximebuyse opened 2 months ago
This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.
Here is a slightly minimized version:
#[allow(dead_code)]
fn f(f: impl FnOnce(()) -> ()) {}
/// The following `into` is (wrongly) extracted as `Core.Convert.Into.into`
fn g() {
f(Into::into)
}
/// While here it is extracted as `Core.Convert.f_into`
fn h() {
Into::into(())
}
Open this code snippet in the playground
It's a problem of Kind
in impl exprs.
From THIR, we get a GlobalName
for Into::into
in g
: we have no impl_expr
.
I wonder if we should not move impl_expr and friends from the Call
node to the GlobalName
node, in the frontend.
Open this code snippet in the playground
Here
Res::try_from
is translated asCore.Convert.TryFrom.try_from
instead off_try_from
from the type class implementation.