Files
rust/tests
Jason Newcomb d36794f5ec Add iterator reduction coverage to never_loop (#16222)
Fixes rust-lang/rust-clippy#16061.

Extend `never_loop` to also lint iterator reduction methods (e.g.
`for_each`, `try_for_each`, `fold`, `try_fold`, `reduce`, `all`, `any`)
when the closure’s body diverges (return type `!`). Add a UI test
`never_loop_iterator_reduction` to cover these cases.

Testing:
- TESTNAME=never_loop_iterator_reduction cargo uitest

changelog: [`never_loop`]: lint diverging iterator reduction closures
like `for_each` and `fold`
2025-12-15 12:00:31 +00:00
..