mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 03:07:25 +00:00

Don't ICE if TAIT-defining fn contains a closure with `_` in return type
The `delay_span_bug` got added in 0e82aaeb67
to reduce the amount of errors emitted for functions that have `_` in their return type, because inference doesn't apply to function items. But this logic shouldn't apply to closures, because their return types *can* be inferred.
Fixes https://github.com/rust-lang/rust/issues/119916.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.