Files
rust/compiler
Jonathan Brouwer 01cccf92dc Rollup merge of #156301 - TaKO8Ki:fix-156299-closure-receiver-suggestion-ice, r=wesleywiser
Avoid ICE when suggesting as_ref for ill-typed closure receivers

Fixes rust-lang/rust#156299

When building mismatch suggestions, `can_use_as_ref` may inspect the receiver of a method call that is itself an ill-typed closure expression. In that recovery path, the receiver may not have a recorded type in `TypeckResults`.

Use `expr_ty_opt` instead of `expr_ty` so the optional `as_ref()` suggestion is skipped when the receiver type is unavailable.
2026-05-08 16:18:42 +02:00
..
2026-05-05 12:12:02 +00:00
2026-05-07 21:55:44 +03:00
2026-05-07 21:55:44 +03:00
2026-05-07 21:55:44 +03:00
2026-05-07 21:55:44 +03:00
2026-05-07 21:55:44 +03:00
2026-05-07 21:55:44 +03:00
2026-05-07 21:55:44 +03:00
2026-04-08 21:09:07 +02:00
2026-05-07 21:55:44 +03:00
2026-05-07 21:55:44 +03:00