RS.CLIPPY.NEVER_LOOP

Any loop that will always `break` or `return`

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: never_loop. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for loops that will always break, return or continue an outer loop.

Why is this bad?

This loop never loops, all it does is obfuscating the code.

Example

loop {
    ..;
    break;
}