]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/integer_arithmetic.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / integer_arithmetic.stderr
CommitLineData
f20569fa
XL
1error: this operation will panic at runtime
2 --> $DIR/integer_arithmetic.rs:37:5
3 |
4LL | i /= 0;
5 | ^^^^^^ attempt to divide `_` by zero
6 |
7 = note: `#[deny(unconditional_panic)]` on by default
8
9error: this operation will panic at runtime
10 --> $DIR/integer_arithmetic.rs:42:5
11 |
12LL | i %= 0;
13 | ^^^^^^ attempt to calculate the remainder of `_` with a divisor of zero
14
15error: integer arithmetic detected
16 --> $DIR/integer_arithmetic.rs:16:5
17 |
18LL | 1 + i;
19 | ^^^^^
20 |
21 = note: `-D clippy::integer-arithmetic` implied by `-D warnings`
22
23error: integer arithmetic detected
24 --> $DIR/integer_arithmetic.rs:17:5
25 |
26LL | i * 2;
27 | ^^^^^
28
29error: integer arithmetic detected
30 --> $DIR/integer_arithmetic.rs:18:5
31 |
32LL | / 1 %
33LL | | i / 2; // no error, this is part of the expression in the preceding line
34 | |_____^
35
36error: integer arithmetic detected
37 --> $DIR/integer_arithmetic.rs:20:5
38 |
39LL | i - 2 + 2 - i;
40 | ^^^^^^^^^^^^^
41
42error: integer arithmetic detected
43 --> $DIR/integer_arithmetic.rs:21:5
44 |
45LL | -i;
46 | ^^
47
48error: integer arithmetic detected
49 --> $DIR/integer_arithmetic.rs:22:5
50 |
51LL | i >> 1;
52 | ^^^^^^
53
54error: integer arithmetic detected
55 --> $DIR/integer_arithmetic.rs:23:5
56 |
57LL | i << 1;
58 | ^^^^^^
59
60error: integer arithmetic detected
61 --> $DIR/integer_arithmetic.rs:33:5
62 |
63LL | i += 1;
64 | ^^^^^^
65
66error: integer arithmetic detected
67 --> $DIR/integer_arithmetic.rs:34:5
68 |
69LL | i -= 1;
70 | ^^^^^^
71
72error: integer arithmetic detected
73 --> $DIR/integer_arithmetic.rs:35:5
74 |
75LL | i *= 2;
76 | ^^^^^^
77
78error: integer arithmetic detected
79 --> $DIR/integer_arithmetic.rs:38:11
80 |
81LL | i /= -1;
82 | ^
83
84error: integer arithmetic detected
85 --> $DIR/integer_arithmetic.rs:39:5
86 |
87LL | i /= var1;
88 | ^^^^^^^^^
89
90error: integer arithmetic detected
91 --> $DIR/integer_arithmetic.rs:40:5
92 |
93LL | i /= var2;
94 | ^^^^^^^^^
95
96error: integer arithmetic detected
97 --> $DIR/integer_arithmetic.rs:43:11
98 |
99LL | i %= -1;
100 | ^
101
102error: integer arithmetic detected
103 --> $DIR/integer_arithmetic.rs:44:5
104 |
105LL | i %= var1;
106 | ^^^^^^^^^
107
108error: integer arithmetic detected
109 --> $DIR/integer_arithmetic.rs:45:5
110 |
111LL | i %= var2;
112 | ^^^^^^^^^
113
114error: integer arithmetic detected
115 --> $DIR/integer_arithmetic.rs:46:5
116 |
117LL | i <<= 3;
118 | ^^^^^^^
119
120error: integer arithmetic detected
121 --> $DIR/integer_arithmetic.rs:47:5
122 |
123LL | i >>= 2;
124 | ^^^^^^^
125
126error: integer arithmetic detected
127 --> $DIR/integer_arithmetic.rs:89:5
128 |
129LL | 3 + &1;
130 | ^^^^^^
131
132error: integer arithmetic detected
133 --> $DIR/integer_arithmetic.rs:90:5
134 |
135LL | &3 + 1;
136 | ^^^^^^
137
138error: integer arithmetic detected
139 --> $DIR/integer_arithmetic.rs:91:5
140 |
141LL | &3 + &1;
142 | ^^^^^^^
143
144error: integer arithmetic detected
145 --> $DIR/integer_arithmetic.rs:96:5
146 |
147LL | a + x
148 | ^^^^^
149
150error: integer arithmetic detected
151 --> $DIR/integer_arithmetic.rs:100:5
152 |
153LL | x + y
154 | ^^^^^
155
156error: integer arithmetic detected
157 --> $DIR/integer_arithmetic.rs:104:5
158 |
159LL | x + y
160 | ^^^^^
161
162error: integer arithmetic detected
163 --> $DIR/integer_arithmetic.rs:108:5
164 |
165LL | (&x + &y)
166 | ^^^^^^^^^
167
168error: aborting due to 27 previous errors
169