fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
9.4 KiB248 linesraw
1error: attempt to divide with overflow
2  --> $DIR/issue-8460-const.rs:9:36
3   |
4LL |     assert!(thread::spawn(move|| { isize::MIN / -1; }).join().is_err());
5   |                                    ^^^^^^^^^^^^^^^
6   |
7note: lint level defined here
8  --> $DIR/issue-8460-const.rs:3:9
9   |
10LL | #![deny(const_err)]
11   |         ^^^^^^^^^
12
13error: this expression will panic at runtime
14  --> $DIR/issue-8460-const.rs:9:36
15   |
16LL |     assert!(thread::spawn(move|| { isize::MIN / -1; }).join().is_err());
17   |                                    ^^^^^^^^^^^^^^^ attempt to divide with overflow
18
19error: attempt to divide with overflow
20  --> $DIR/issue-8460-const.rs:12:36
21   |
22LL |     assert!(thread::spawn(move|| { i8::MIN / -1; }).join().is_err());
23   |                                    ^^^^^^^^^^^^
24
25error: this expression will panic at runtime
26  --> $DIR/issue-8460-const.rs:12:36
27   |
28LL |     assert!(thread::spawn(move|| { i8::MIN / -1; }).join().is_err());
29   |                                    ^^^^^^^^^^^^ attempt to divide with overflow
30
31error: attempt to divide with overflow
32  --> $DIR/issue-8460-const.rs:15:36
33   |
34LL |     assert!(thread::spawn(move|| { i16::MIN / -1; }).join().is_err());
35   |                                    ^^^^^^^^^^^^^
36
37error: this expression will panic at runtime
38  --> $DIR/issue-8460-const.rs:15:36
39   |
40LL |     assert!(thread::spawn(move|| { i16::MIN / -1; }).join().is_err());
41   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
42
43error: attempt to divide with overflow
44  --> $DIR/issue-8460-const.rs:18:36
45   |
46LL |     assert!(thread::spawn(move|| { i32::MIN / -1; }).join().is_err());
47   |                                    ^^^^^^^^^^^^^
48
49error: this expression will panic at runtime
50  --> $DIR/issue-8460-const.rs:18:36
51   |
52LL |     assert!(thread::spawn(move|| { i32::MIN / -1; }).join().is_err());
53   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
54
55error: attempt to divide with overflow
56  --> $DIR/issue-8460-const.rs:21:36
57   |
58LL |     assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err());
59   |                                    ^^^^^^^^^^^^^
60
61error: this expression will panic at runtime
62  --> $DIR/issue-8460-const.rs:21:36
63   |
64LL |     assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err());
65   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
66
67error: attempt to divide by zero
68  --> $DIR/issue-8460-const.rs:24:36
69   |
70LL |     assert!(thread::spawn(move|| { 1isize / 0; }).join().is_err());
71   |                                    ^^^^^^^^^^
72
73error: this expression will panic at runtime
74  --> $DIR/issue-8460-const.rs:24:36
75   |
76LL |     assert!(thread::spawn(move|| { 1isize / 0; }).join().is_err());
77   |                                    ^^^^^^^^^^ attempt to divide by zero
78
79error: attempt to divide by zero
80  --> $DIR/issue-8460-const.rs:27:36
81   |
82LL |     assert!(thread::spawn(move|| { 1i8 / 0; }).join().is_err());
83   |                                    ^^^^^^^
84
85error: this expression will panic at runtime
86  --> $DIR/issue-8460-const.rs:27:36
87   |
88LL |     assert!(thread::spawn(move|| { 1i8 / 0; }).join().is_err());
89   |                                    ^^^^^^^ attempt to divide by zero
90
91error: attempt to divide by zero
92  --> $DIR/issue-8460-const.rs:30:36
93   |
94LL |     assert!(thread::spawn(move|| { 1i16 / 0; }).join().is_err());
95   |                                    ^^^^^^^^
96
97error: this expression will panic at runtime
98  --> $DIR/issue-8460-const.rs:30:36
99   |
100LL |     assert!(thread::spawn(move|| { 1i16 / 0; }).join().is_err());
101   |                                    ^^^^^^^^ attempt to divide by zero
102
103error: attempt to divide by zero
104  --> $DIR/issue-8460-const.rs:33:36
105   |
106LL |     assert!(thread::spawn(move|| { 1i32 / 0; }).join().is_err());
107   |                                    ^^^^^^^^
108
109error: this expression will panic at runtime
110  --> $DIR/issue-8460-const.rs:33:36
111   |
112LL |     assert!(thread::spawn(move|| { 1i32 / 0; }).join().is_err());
113   |                                    ^^^^^^^^ attempt to divide by zero
114
115error: attempt to divide by zero
116  --> $DIR/issue-8460-const.rs:36:36
117   |
118LL |     assert!(thread::spawn(move|| { 1i64 / 0; }).join().is_err());
119   |                                    ^^^^^^^^
120
121error: this expression will panic at runtime
122  --> $DIR/issue-8460-const.rs:36:36
123   |
124LL |     assert!(thread::spawn(move|| { 1i64 / 0; }).join().is_err());
125   |                                    ^^^^^^^^ attempt to divide by zero
126
127error: attempt to calculate the remainder with overflow
128  --> $DIR/issue-8460-const.rs:39:36
129   |
130LL |     assert!(thread::spawn(move|| { isize::MIN % -1; }).join().is_err());
131   |                                    ^^^^^^^^^^^^^^^
132
133error: this expression will panic at runtime
134  --> $DIR/issue-8460-const.rs:39:36
135   |
136LL |     assert!(thread::spawn(move|| { isize::MIN % -1; }).join().is_err());
137   |                                    ^^^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
138
139error: attempt to calculate the remainder with overflow
140  --> $DIR/issue-8460-const.rs:42:36
141   |
142LL |     assert!(thread::spawn(move|| { i8::MIN % -1; }).join().is_err());
143   |                                    ^^^^^^^^^^^^
144
145error: this expression will panic at runtime
146  --> $DIR/issue-8460-const.rs:42:36
147   |
148LL |     assert!(thread::spawn(move|| { i8::MIN % -1; }).join().is_err());
149   |                                    ^^^^^^^^^^^^ attempt to calculate the remainder with overflow
150
151error: attempt to calculate the remainder with overflow
152  --> $DIR/issue-8460-const.rs:45:36
153   |
154LL |     assert!(thread::spawn(move|| { i16::MIN % -1; }).join().is_err());
155   |                                    ^^^^^^^^^^^^^
156
157error: this expression will panic at runtime
158  --> $DIR/issue-8460-const.rs:45:36
159   |
160LL |     assert!(thread::spawn(move|| { i16::MIN % -1; }).join().is_err());
161   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
162
163error: attempt to calculate the remainder with overflow
164  --> $DIR/issue-8460-const.rs:48:36
165   |
166LL |     assert!(thread::spawn(move|| { i32::MIN % -1; }).join().is_err());
167   |                                    ^^^^^^^^^^^^^
168
169error: this expression will panic at runtime
170  --> $DIR/issue-8460-const.rs:48:36
171   |
172LL |     assert!(thread::spawn(move|| { i32::MIN % -1; }).join().is_err());
173   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
174
175error: attempt to calculate the remainder with overflow
176  --> $DIR/issue-8460-const.rs:51:36
177   |
178LL |     assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err());
179   |                                    ^^^^^^^^^^^^^
180
181error: this expression will panic at runtime
182  --> $DIR/issue-8460-const.rs:51:36
183   |
184LL |     assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err());
185   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
186
187error: attempt to calculate the remainder with a divisor of zero
188  --> $DIR/issue-8460-const.rs:54:36
189   |
190LL |     assert!(thread::spawn(move|| { 1isize % 0; }).join().is_err());
191   |                                    ^^^^^^^^^^
192
193error: this expression will panic at runtime
194  --> $DIR/issue-8460-const.rs:54:36
195   |
196LL |     assert!(thread::spawn(move|| { 1isize % 0; }).join().is_err());
197   |                                    ^^^^^^^^^^ attempt to calculate the remainder with a divisor of zero
198
199error: attempt to calculate the remainder with a divisor of zero
200  --> $DIR/issue-8460-const.rs:57:36
201   |
202LL |     assert!(thread::spawn(move|| { 1i8 % 0; }).join().is_err());
203   |                                    ^^^^^^^
204
205error: this expression will panic at runtime
206  --> $DIR/issue-8460-const.rs:57:36
207   |
208LL |     assert!(thread::spawn(move|| { 1i8 % 0; }).join().is_err());
209   |                                    ^^^^^^^ attempt to calculate the remainder with a divisor of zero
210
211error: attempt to calculate the remainder with a divisor of zero
212  --> $DIR/issue-8460-const.rs:60:36
213   |
214LL |     assert!(thread::spawn(move|| { 1i16 % 0; }).join().is_err());
215   |                                    ^^^^^^^^
216
217error: this expression will panic at runtime
218  --> $DIR/issue-8460-const.rs:60:36
219   |
220LL |     assert!(thread::spawn(move|| { 1i16 % 0; }).join().is_err());
221   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
222
223error: attempt to calculate the remainder with a divisor of zero
224  --> $DIR/issue-8460-const.rs:63:36
225   |
226LL |     assert!(thread::spawn(move|| { 1i32 % 0; }).join().is_err());
227   |                                    ^^^^^^^^
228
229error: this expression will panic at runtime
230  --> $DIR/issue-8460-const.rs:63:36
231   |
232LL |     assert!(thread::spawn(move|| { 1i32 % 0; }).join().is_err());
233   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
234
235error: attempt to calculate the remainder with a divisor of zero
236  --> $DIR/issue-8460-const.rs:66:36
237   |
238LL |     assert!(thread::spawn(move|| { 1i64 % 0; }).join().is_err());
239   |                                    ^^^^^^^^
240
241error: this expression will panic at runtime
242  --> $DIR/issue-8460-const.rs:66:36
243   |
244LL |     assert!(thread::spawn(move|| { 1i64 % 0; }).join().is_err());
245   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
246
247error: aborting due to 40 previous errors
248