Jonathan Brouwer
f5c2bd7a83
Rollup merge of #158376 - ChronoCoders:diag-eq-gt-closure-arg, r=chenyukang
...
Suggest `>=` for `=>` typo in closure and call argument positions
The parser suggests replacing `=>` with `>=` when it looks like a typo in a comparison, but it skipped the suggestion whenever a comma was an expected token. That excluded closure bodies used as call arguments, such as `iter.position(|x| x => &y)`, which is the case reported in rust-lang/rust#149805 .
The comma exclusion was there to avoid suggesting `>=` for a missing comma between match arms, where `=>` is a real arm arrow. Those cases have a close brace in the expected token set, while the comparison cases do not, so this gates on the close brace instead of the comma. The existing `if`/`let`/`match` cases keep working, and the missing-comma-in-match suggestion is unaffected.
Fixes rust-lang/rust#149805
2026-06-26 20:22:20 +02:00
..
2026-03-21 20:10:07 +00:00
2026-06-07 21:12:22 -04:00
2026-05-27 16:09:22 +02:00
2026-01-02 22:32:52 +00:00
2026-04-09 18:53:59 +02:00
2026-03-26 11:42:38 +08:00
2026-03-29 21:16:08 +01:00
2026-05-13 02:40:58 +00:00
2026-06-17 00:34:01 +09:00
2026-03-13 10:00:39 +00:00
2026-04-20 15:08:37 -07:00
2026-04-18 13:03:47 +08:00
2026-04-18 13:03:47 +08:00
2026-05-03 10:59:52 +02:00
2026-05-03 10:59:52 +02:00
2026-01-26 04:09:28 +05:30
2026-05-11 16:58:25 +08:00
2026-05-11 16:58:25 +08:00
2026-05-16 20:23:53 -04:00
2026-05-16 20:23:53 -04:00
2025-12-16 02:10:08 +09:00
2025-12-16 02:10:08 +09:00
2026-06-02 23:00:47 +08:00
2026-06-02 23:00:47 +08:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-06-17 17:42:48 +02:00
2026-06-17 17:42:48 +02:00
2026-02-12 18:49:58 +08:00
2026-03-21 20:10:07 +00:00
2026-03-21 20:10:07 +00:00
2026-03-21 20:10:07 +00:00
2026-03-21 20:10:07 +00:00
2026-05-17 23:54:13 +02:00
2026-05-17 23:54:13 +02:00
2026-05-09 01:27:23 +09:00
2026-05-09 01:27:23 +09:00
2026-02-12 15:12:29 +08:00
2026-02-12 15:12:29 +08:00
2026-06-09 18:03:46 -04:00
2026-06-09 18:03:46 -04:00
2026-03-28 16:18:11 +09:00
2026-03-28 16:18:11 +09:00
2026-06-25 16:35:47 -04:00
2026-06-25 16:35:47 -04:00
2026-06-25 16:35:47 -04:00
2026-06-07 19:00:21 +02:00
2026-06-07 19:00:21 +02:00
2026-06-07 19:00:21 +02:00
2026-06-07 19:00:21 +02:00
2026-05-31 04:04:30 +05:30
2026-06-02 23:00:47 +08:00
2026-06-02 23:00:47 +08:00
2026-05-16 20:23:53 -04:00
2026-05-16 20:23:53 -04:00
2026-02-24 00:04:45 -05:00
2026-06-17 17:42:48 +02:00
2026-02-22 20:20:33 +01:00
2026-03-24 22:31:37 +09:00
2026-03-24 22:31:37 +09:00
2026-04-22 12:27:03 +02:00
2026-04-22 12:27:03 +02:00
2026-04-22 12:27:03 +02:00
2026-02-12 15:30:41 +08:00
2026-02-12 15:30:41 +08:00
2026-04-20 22:21:51 +08:00
2026-01-15 19:32:39 +00:00
2026-01-15 19:32:39 +00:00
2026-01-15 19:32:39 +00:00
2025-12-23 21:13:24 +09:00
2025-12-23 21:13:24 +09:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-03-14 20:13:43 +00:00
2026-03-14 20:13:43 +00:00
2026-04-26 21:41:46 +10:00
2026-04-26 21:41:46 +10:00
2026-03-06 17:44:18 +01:00
2026-04-23 22:28:00 +02:00
2026-04-23 22:28:00 +02:00
2026-01-26 04:09:28 +05:30
2026-01-26 04:09:28 +05:30
2026-02-16 12:24:15 +00:00
2025-12-22 13:55:49 +00:00
2026-04-01 17:01:59 +02:00
2025-12-23 21:13:24 +09:00
2025-12-23 21:13:24 +09:00
2026-03-26 11:42:38 +08:00
2026-03-26 11:42:38 +08:00
2026-03-26 11:42:38 +08:00
2026-02-14 22:55:26 +01:00
2026-02-14 22:55:26 +01:00
2026-04-10 21:45:26 +08:00
2026-04-10 21:45:26 +08:00