Unnamed repository; edit this file 'description' to name the repository.
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
Jonathan Brouwer 3 weeks ago
parent f921d1a · parent 8e61983 · commit 014f9d0
0 files changed, 0 insertions, 0 deletions