mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 03:53:20 +00:00
95 lines
2.8 KiB
Text
95 lines
2.8 KiB
Text
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:22:11
|
|
|
|
|
LL | while y < 10 {
|
|
| ^^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
= note: `#[deny(clippy::while_immutable_condition)]` on by default
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:29:11
|
|
|
|
|
LL | while y < 10 && x < 3 {
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:38:11
|
|
|
|
|
LL | while !cond {
|
|
| ^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:84:11
|
|
|
|
|
LL | while i < 3 {
|
|
| ^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:91:11
|
|
|
|
|
LL | while i < 3 && j > 0 {
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:97:11
|
|
|
|
|
LL | while i < 3 {
|
|
| ^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:114:11
|
|
|
|
|
LL | while i < 3 {
|
|
| ^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:121:11
|
|
|
|
|
LL | while i < 3 {
|
|
| ^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:189:15
|
|
|
|
|
LL | while self.count < n {
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:199:11
|
|
|
|
|
LL | while y < 10 {
|
|
| ^^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
= note: this loop contains `return`s or `break`s
|
|
= help: rewrite it as `if cond { loop { } }`
|
|
|
|
error: variables in the condition are not mutated in the loop body
|
|
--> tests/ui/infinite_loop.rs:208:11
|
|
|
|
|
LL | while y < 10 {
|
|
| ^^^^^^
|
|
|
|
|
= note: this may lead to an infinite or to a never running loop
|
|
= note: this loop contains `return`s or `break`s
|
|
= help: rewrite it as `if cond { loop { } }`
|
|
|
|
error: aborting due to 11 previous errors
|
|
|