Files
rust/tests/ui/suggestions
Jonathan Brouwer abbab2d67c Rollup merge of #157917 - onehr:fix-for-loop-missing-in-suggestion-103561, r=folkertdev
Don't suggest adding `in` to a `for` loop that already has one

Closes rust-lang/rust#103561.

When a `for` loop is missing its `in`, the parser suggested inserting one based only on the token following the pattern. For a malformed binding such as `for i i in 0..10` it therefore suggested `for i in i in 0..10`, which is itself invalid.

The suggestion is now only emitted when the loop header does not already contain an `in` before the body. The `for x EXPR` / `for x of EXPR` / `for x = EXPR` suggestions are unchanged.
2026-06-17 22:36:25 +02:00
..
2025-11-27 14:13:58 -05:00
…
2025-04-03 21:41:58 +00:00
2026-02-17 16:51:44 +00:00
2025-07-13 13:50:01 +00:00
2026-03-28 16:18:11 +09:00
2026-03-28 16:18:11 +09:00
2025-11-27 11:19:00 -05:00
2025-06-26 03:43:01 +00:00
2025-06-03 10:52:32 -07:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00