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