fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.1 KiB104 linesraw
1error: variables in the condition are not mutated in the loop body
2  --> $DIR/infinite_loop.rs:24:11
3   |
4LL |     while y < 10 {
5   |           ^^^^^^
6   |
7   = note: this may lead to an infinite or to a never running loop
8   = note: `#[deny(clippy::while_immutable_condition)]` on by default
9
10error: variables in the condition are not mutated in the loop body
11  --> $DIR/infinite_loop.rs:31:11
12   |
13LL |     while y < 10 && x < 3 {
14   |           ^^^^^^^^^^^^^^^
15   |
16   = note: this may lead to an infinite or to a never running loop
17
18error: variables in the condition are not mutated in the loop body
19  --> $DIR/infinite_loop.rs:40:11
20   |
21LL |     while !cond {
22   |           ^^^^^
23   |
24   = note: this may lead to an infinite or to a never running loop
25
26error: variables in the condition are not mutated in the loop body
27  --> $DIR/infinite_loop.rs:86:11
28   |
29LL |     while i < 3 {
30   |           ^^^^^
31   |
32   = note: this may lead to an infinite or to a never running loop
33
34error: variables in the condition are not mutated in the loop body
35  --> $DIR/infinite_loop.rs:93:11
36   |
37LL |     while i < 3 && j > 0 {
38   |           ^^^^^^^^^^^^^^
39   |
40   = note: this may lead to an infinite or to a never running loop
41
42error: variables in the condition are not mutated in the loop body
43  --> $DIR/infinite_loop.rs:99:11
44   |
45LL |     while i < 3 {
46   |           ^^^^^
47   |
48   = note: this may lead to an infinite or to a never running loop
49
50error: variables in the condition are not mutated in the loop body
51  --> $DIR/infinite_loop.rs:116:11
52   |
53LL |     while i < 3 {
54   |           ^^^^^
55   |
56   = note: this may lead to an infinite or to a never running loop
57
58error: variables in the condition are not mutated in the loop body
59  --> $DIR/infinite_loop.rs:123:11
60   |
61LL |     while i < 3 {
62   |           ^^^^^
63   |
64   = note: this may lead to an infinite or to a never running loop
65
66error: variables in the condition are not mutated in the loop body
67  --> $DIR/infinite_loop.rs:191:15
68   |
69LL |         while self.count < n {
70   |               ^^^^^^^^^^^^^^
71   |
72   = note: this may lead to an infinite or to a never running loop
73
74error: variables in the condition are not mutated in the loop body
75  --> $DIR/infinite_loop.rs:201:11
76   |
77LL |     while y < 10 {
78   |           ^^^^^^
79   |
80   = note: this may lead to an infinite or to a never running loop
81   = note: this loop contains `return`s or `break`s
82   = help: rewrite it as `if cond { loop { } }`
83
84error: variables in the condition are not mutated in the loop body
85  --> $DIR/infinite_loop.rs:210:11
86   |
87LL |     while y < 10 {
88   |           ^^^^^^
89   |
90   = note: this may lead to an infinite or to a never running loop
91   = note: this loop contains `return`s or `break`s
92   = help: rewrite it as `if cond { loop { } }`
93
94error: this argument is a mutable reference, but not used mutably
95  --> $DIR/infinite_loop.rs:9:17
96   |
97LL | fn fn_mutref(i: &mut i32) {
98   |                 ^^^^^^^^ help: consider changing to: `&i32`
99   |
100   = note: `-D clippy::needless-pass-by-ref-mut` implied by `-D warnings`
101   = help: to override `-D warnings` add `#[allow(clippy::needless_pass_by_ref_mut)]`
102
103error: aborting due to 12 previous errors
104