Files
rust/tests/ui/closures
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
..
2025-11-27 14:13:58 -05:00
2025-06-30 11:50:19 +05:00
2025-08-05 19:34:46 +05:00
2025-07-01 16:26:57 +05:00
2023-06-20 19:46:01 -04:00
2025-08-27 00:23:26 -04:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-07-31 21:25:49 +05:00
2025-07-31 21:25:49 +05:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2023-01-11 09:32:08 +00:00
2023-08-28 17:47:37 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2023-10-20 21:14:01 +00:00
2025-08-22 13:16:44 +08:00
2025-08-22 13:16:44 +08:00
2023-01-11 09:32:08 +00:00
2025-04-09 10:42:26 +00:00
2025-12-02 18:25:13 +00:00
2025-11-27 14:13:58 -05:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2024-12-13 00:04:56 +00:00
2024-12-13 00:04:56 +00:00
2025-07-01 15:29:29 +05:00
2023-01-11 09:32:08 +00:00
2025-12-16 02:10:08 +09:00
2026-01-31 14:01:54 +01:00
2026-01-31 14:01:54 +01:00
2025-08-09 16:27:20 +05:00