mirror of
https://github.com/rust-lang/rust.git
synced 2026-07-21 23:26:41 -04:00
3467b6fc20
A delegation item (`reuse path::method`) has an unresolved HIR signature: its inputs and return type are `InferDelegation` nodes that clean to `_`. When the delegated function is async, the `async` header over that inferred return type made `clean_fn_decl_with_params` call `sugared_async_return_type` on a non-`impl Future` type, panicking with "unexpected async fn return type". Clean the resolved ty-side signature for delegation items instead, the same way inlined items are cleaned. This avoids the ICE and renders the real return type and `self` parameter rather than `-> _` / `self: _`.