Files
rust/tests/ui/parser
Matthias Krüger 0a579d5247 Rollup merge of #138749 - compiler-errors:closure-recovery, r=fmease
Fix closure recovery for missing block when return type is specified

Firstly, fix the `is_array_like_block` condition to make sure we're actually recovering a mistyped *block* rather than some other delimited expression. This fixes #138748.

Secondly, split out the recovery of missing braces on a closure body into a separate recovery. Right now, the suggestion `"you might have meant to write this as part of a block"` originates from `suggest_fixes_misparsed_for_loop_head`, which feels kinda brittle and coincidental since AFAICT that recovery wasn't ever really intended to fix this.

We also can make this `MachineApplicable` in this case.

Fixes #138748

r? `@fmease` or reassign if you're busy/don't wanna review this
2025-03-31 14:36:21 +02:00
..
2024-12-08 15:32:04 +08:00
2025-03-07 17:55:08 +00:00
2025-03-06 17:58:32 -03:00
2024-12-10 11:34:13 +08:00
2023-01-11 09:32:08 +00:00
2025-01-07 16:04:14 +01:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-01-07 16:04:14 +01: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
2023-01-11 09:32:08 +00:00
2024-11-29 06:10:15 +11:00
2023-05-05 21:44:48 +02:00
2023-05-05 21:44:48 +02:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-26 10:52:57 +08: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
2024-11-16 20:03:31 +00:00
2023-01-11 09:32:08 +00:00
2023-05-05 11:17:14 -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
2024-10-11 11:30:08 -04:00
2023-01-11 09:32:08 +00:00
2024-11-29 06:10:15 +11:00
2023-01-11 09:32:08 +00: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
2024-04-21 15:43:43 -03:00
2025-01-07 16:04:14 +01:00
2025-01-07 16:04:14 +01: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-01-07 16:04:14 +01:00
2023-01-11 09:32:08 +00:00
2023-10-04 01:35:07 +00:00
2023-10-04 01:35:07 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-02-28 08:36:12 +11:00
2025-02-28 08:36:12 +11: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
2024-11-24 19:42:33 +01:00
2024-11-24 19:42:33 +01: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
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2024-09-21 20:07:52 +03:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-19 02:25:55 +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
2023-01-11 09:32:08 +00:00