mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00

Move `needless_pass_by_ref_mut`: `suspicious` -> `nursery` [Related to [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/needless_pass_by_ref_mut.20isn't.20ready.20for.20stable)] `needless_pass_by_ref_mut` has been released with some important bugs (notably having a lot of reported false positives and an ICE). So it may not be really ready for being in stable until these problems are solved. This PR changes the lint's category from `suspicious` to `nursery`, just that. changelog: none
96 lines
2.8 KiB
Plaintext
96 lines
2.8 KiB
Plaintext
error: variables in the condition are not mutated in the loop body
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
--> $DIR/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
|
|
|