fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
6.1 KiB150 linesraw
1error: this arithmetic operation will overflow
2  --> $DIR/issue-8460-const.rs:14:36
3   |
4LL |     assert!(thread::spawn(move|| { isize::MIN / -1; }).join().is_err());
5   |                                    ^^^^^^^^^^^^^^^ attempt to divide with overflow
6   |
7   = note: `#[deny(arithmetic_overflow)]` on by default
8
9error: this arithmetic operation will overflow
10  --> $DIR/issue-8460-const.rs:16:36
11   |
12LL |     assert!(thread::spawn(move|| { i8::MIN / -1; }).join().is_err());
13   |                                    ^^^^^^^^^^^^ attempt to divide with overflow
14
15error: this arithmetic operation will overflow
16  --> $DIR/issue-8460-const.rs:18:36
17   |
18LL |     assert!(thread::spawn(move|| { i16::MIN / -1; }).join().is_err());
19   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
20
21error: this arithmetic operation will overflow
22  --> $DIR/issue-8460-const.rs:20:36
23   |
24LL |     assert!(thread::spawn(move|| { i32::MIN / -1; }).join().is_err());
25   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
26
27error: this arithmetic operation will overflow
28  --> $DIR/issue-8460-const.rs:22:36
29   |
30LL |     assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err());
31   |                                    ^^^^^^^^^^^^^ attempt to divide with overflow
32
33error: this arithmetic operation will overflow
34  --> $DIR/issue-8460-const.rs:24:36
35   |
36LL |     assert!(thread::spawn(move|| { i128::MIN / -1; }).join().is_err());
37   |                                    ^^^^^^^^^^^^^^ attempt to divide with overflow
38
39error: this operation will panic at runtime
40  --> $DIR/issue-8460-const.rs:26:36
41   |
42LL |     assert!(thread::spawn(move|| { 1isize / 0; }).join().is_err());
43   |                                    ^^^^^^^^^^ attempt to divide by zero
44   |
45   = note: `#[deny(unconditional_panic)]` on by default
46
47error: this operation will panic at runtime
48  --> $DIR/issue-8460-const.rs:28:36
49   |
50LL |     assert!(thread::spawn(move|| { 1i8 / 0; }).join().is_err());
51   |                                    ^^^^^^^ attempt to divide by zero
52
53error: this operation will panic at runtime
54  --> $DIR/issue-8460-const.rs:30:36
55   |
56LL |     assert!(thread::spawn(move|| { 1i16 / 0; }).join().is_err());
57   |                                    ^^^^^^^^ attempt to divide by zero
58
59error: this operation will panic at runtime
60  --> $DIR/issue-8460-const.rs:32:36
61   |
62LL |     assert!(thread::spawn(move|| { 1i32 / 0; }).join().is_err());
63   |                                    ^^^^^^^^ attempt to divide by zero
64
65error: this operation will panic at runtime
66  --> $DIR/issue-8460-const.rs:34:36
67   |
68LL |     assert!(thread::spawn(move|| { 1i64 / 0; }).join().is_err());
69   |                                    ^^^^^^^^ attempt to divide by zero
70
71error: this operation will panic at runtime
72  --> $DIR/issue-8460-const.rs:36:36
73   |
74LL |     assert!(thread::spawn(move|| { 1i128 / 0; }).join().is_err());
75   |                                    ^^^^^^^^^ attempt to divide by zero
76
77error: this arithmetic operation will overflow
78  --> $DIR/issue-8460-const.rs:38:36
79   |
80LL |     assert!(thread::spawn(move|| { isize::MIN % -1; }).join().is_err());
81   |                                    ^^^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
82
83error: this arithmetic operation will overflow
84  --> $DIR/issue-8460-const.rs:40:36
85   |
86LL |     assert!(thread::spawn(move|| { i8::MIN % -1; }).join().is_err());
87   |                                    ^^^^^^^^^^^^ attempt to calculate the remainder with overflow
88
89error: this arithmetic operation will overflow
90  --> $DIR/issue-8460-const.rs:42:36
91   |
92LL |     assert!(thread::spawn(move|| { i16::MIN % -1; }).join().is_err());
93   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
94
95error: this arithmetic operation will overflow
96  --> $DIR/issue-8460-const.rs:44:36
97   |
98LL |     assert!(thread::spawn(move|| { i32::MIN % -1; }).join().is_err());
99   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
100
101error: this arithmetic operation will overflow
102  --> $DIR/issue-8460-const.rs:46:36
103   |
104LL |     assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err());
105   |                                    ^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
106
107error: this arithmetic operation will overflow
108  --> $DIR/issue-8460-const.rs:48:36
109   |
110LL |     assert!(thread::spawn(move|| { i128::MIN % -1; }).join().is_err());
111   |                                    ^^^^^^^^^^^^^^ attempt to calculate the remainder with overflow
112
113error: this operation will panic at runtime
114  --> $DIR/issue-8460-const.rs:50:36
115   |
116LL |     assert!(thread::spawn(move|| { 1isize % 0; }).join().is_err());
117   |                                    ^^^^^^^^^^ attempt to calculate the remainder with a divisor of zero
118
119error: this operation will panic at runtime
120  --> $DIR/issue-8460-const.rs:52:36
121   |
122LL |     assert!(thread::spawn(move|| { 1i8 % 0; }).join().is_err());
123   |                                    ^^^^^^^ attempt to calculate the remainder with a divisor of zero
124
125error: this operation will panic at runtime
126  --> $DIR/issue-8460-const.rs:54:36
127   |
128LL |     assert!(thread::spawn(move|| { 1i16 % 0; }).join().is_err());
129   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
130
131error: this operation will panic at runtime
132  --> $DIR/issue-8460-const.rs:56:36
133   |
134LL |     assert!(thread::spawn(move|| { 1i32 % 0; }).join().is_err());
135   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
136
137error: this operation will panic at runtime
138  --> $DIR/issue-8460-const.rs:58:36
139   |
140LL |     assert!(thread::spawn(move|| { 1i64 % 0; }).join().is_err());
141   |                                    ^^^^^^^^ attempt to calculate the remainder with a divisor of zero
142
143error: this operation will panic at runtime
144  --> $DIR/issue-8460-const.rs:60:36
145   |
146LL |     assert!(thread::spawn(move|| { 1i128 % 0; }).join().is_err());
147   |                                    ^^^^^^^^^ attempt to calculate the remainder with a divisor of zero
148
149error: aborting due to 24 previous errors
150