You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ---------------------- inside `S2` at $DIR/forbidden_slices.rs:21:34
41
+
| ---------------------- inside `S2` at $DIR/forbidden_slices.rs:22:34
42
42
43
43
error[E0080]: it is undefined behavior to use this value
44
-
--> $DIR/forbidden_slices.rs:24:1
44
+
--> $DIR/forbidden_slices.rs:25:1
45
45
|
46
46
LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
47
47
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>[0]: encountered uninitialized bytes
48
48
|
49
49
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
50
50
= note: the raw bytes of the constant (size: 8, align: 4) {
51
-
╾─alloc42─╼ 01 00 00 00 │ ╾──╼....
51
+
╾─ALLOC_ID─╼ 01 00 00 00 │ ╾──╼....
52
52
}
53
53
54
54
error[E0080]: it is undefined behavior to use this value
55
-
--> $DIR/forbidden_slices.rs:26:1
55
+
--> $DIR/forbidden_slices.rs:27:1
56
56
|
57
57
LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) };
58
58
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
59
59
|
60
60
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
61
61
= note: the raw bytes of the constant (size: 8, align: 4) {
62
-
╾─alloc55─╼ 04 00 00 00 │ ╾──╼....
62
+
╾─ALLOC_ID─╼ 04 00 00 00 │ ╾──╼....
63
63
}
64
64
65
65
error[E0080]: it is undefined behavior to use this value
66
-
--> $DIR/forbidden_slices.rs:28:1
66
+
--> $DIR/forbidden_slices.rs:29:1
67
67
|
68
68
LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
69
69
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>[0]: encountered 0x11, but expected a boolean
70
70
|
71
71
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
72
72
= note: the raw bytes of the constant (size: 8, align: 4) {
73
-
╾─alloc65─╼ 04 00 00 00 │ ╾──╼....
73
+
╾─ALLOC_ID─╼ 04 00 00 00 │ ╾──╼....
74
74
}
75
75
76
76
error[E0080]: it is undefined behavior to use this value
77
-
--> $DIR/forbidden_slices.rs:31:1
77
+
--> $DIR/forbidden_slices.rs:32:1
78
78
|
79
79
LL | / pub static S7: &[u16] = unsafe {
80
80
LL | |
@@ -95,13 +95,13 @@ error[E0080]: could not evaluate static initializer
95
95
LL | &*ptr::slice_from_raw_parts(data, len)
96
96
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
97
| |
98
-
| dereferencing pointer failed: alloc96 has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
98
+
| dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
99
99
| inside `std::slice::from_raw_parts::<u64>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
100
100
|
101
-
::: $DIR/forbidden_slices.rs:42:5
101
+
::: $DIR/forbidden_slices.rs:43:5
102
102
|
103
103
LL | from_raw_parts(ptr, 1)
104
-
| ---------------------- inside `S8` at $DIR/forbidden_slices.rs:42:5
104
+
| ---------------------- inside `S8` at $DIR/forbidden_slices.rs:43:5
105
105
106
106
error[E0080]: could not evaluate static initializer
| ---------------------------------------- inside `R1` at $DIR/forbidden_slices.rs:46:33
142
+
| ---------------------------------------- inside `R1` at $DIR/forbidden_slices.rs:47:33
143
143
|
144
144
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
145
145
@@ -149,19 +149,19 @@ error[E0080]: could not evaluate static initializer
149
149
LL | unsafe { intrinsics::offset(self, count) }
150
150
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151
151
| |
152
-
| pointer arithmetic failed: alloc154 has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
152
+
| pointer arithmetic failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
153
153
| inside `ptr::const_ptr::<impl *const u32>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
154
154
...
155
155
LL | unsafe { self.offset(count as isize) }
156
156
| --------------------------- inside `ptr::const_ptr::<impl *const u32>::add` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
157
157
|
158
-
::: $DIR/forbidden_slices.rs:49:25
158
+
::: $DIR/forbidden_slices.rs:50:25
159
159
|
160
160
LL | from_ptr_range(ptr..ptr.add(2))
161
-
| ---------- inside `R2` at $DIR/forbidden_slices.rs:49:25
161
+
| ---------- inside `R2` at $DIR/forbidden_slices.rs:50:25
162
162
163
163
error[E0080]: it is undefined behavior to use this value
164
-
--> $DIR/forbidden_slices.rs:51:1
164
+
--> $DIR/forbidden_slices.rs:52:1
165
165
|
166
166
LL | / pub static R4: &[u8] = unsafe {
167
167
LL | |
@@ -172,11 +172,11 @@ LL | | };
172
172
|
173
173
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
174
174
= note: the raw bytes of the constant (size: 8, align: 4) {
175
-
╾alloc159─╼ 01 00 00 00 │ ╾──╼....
175
+
╾ALLOC_ID─╼ 01 00 00 00 │ ╾──╼....
176
176
}
177
177
178
178
error[E0080]: it is undefined behavior to use this value
179
-
--> $DIR/forbidden_slices.rs:56:1
179
+
--> $DIR/forbidden_slices.rs:57:1
180
180
|
181
181
LL | / pub static R5: &[u8] = unsafe {
182
182
LL | |
@@ -187,11 +187,11 @@ LL | | };
187
187
|
188
188
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
189
189
= note: the raw bytes of the constant (size: 8, align: 4) {
190
-
╾alloc175─╼ 04 00 00 00 │ ╾──╼....
190
+
╾ALLOC_ID─╼ 04 00 00 00 │ ╾──╼....
191
191
}
192
192
193
193
error[E0080]: it is undefined behavior to use this value
194
-
--> $DIR/forbidden_slices.rs:61:1
194
+
--> $DIR/forbidden_slices.rs:62:1
195
195
|
196
196
LL | / pub static R6: &[bool] = unsafe {
197
197
LL | |
@@ -202,11 +202,11 @@ LL | | };
202
202
|
203
203
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
204
204
= note: the raw bytes of the constant (size: 8, align: 4) {
205
-
╾alloc191─╼ 04 00 00 00 │ ╾──╼....
205
+
╾ALLOC_ID─╼ 04 00 00 00 │ ╾──╼....
206
206
}
207
207
208
208
error[E0080]: it is undefined behavior to use this value
209
-
--> $DIR/forbidden_slices.rs:66:1
209
+
--> $DIR/forbidden_slices.rs:67:1
210
210
|
211
211
LL | / pub static R7: &[u16] = unsafe {
212
212
LL | |
@@ -226,16 +226,16 @@ error[E0080]: could not evaluate static initializer
226
226
LL | unsafe { intrinsics::offset(self, count) }
227
227
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
228
228
| |
229
-
| pointer arithmetic failed: alloc230 has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
229
+
| pointer arithmetic failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
230
230
| inside `ptr::const_ptr::<impl *const u64>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
231
231
...
232
232
LL | unsafe { self.offset(count as isize) }
233
233
| --------------------------- inside `ptr::const_ptr::<impl *const u64>::add` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
234
234
|
235
-
::: $DIR/forbidden_slices.rs:73:25
235
+
::: $DIR/forbidden_slices.rs:74:25
236
236
|
237
237
LL | from_ptr_range(ptr..ptr.add(1))
238
-
| ---------- inside `R8` at $DIR/forbidden_slices.rs:73:25
238
+
| ---------- inside `R8` at $DIR/forbidden_slices.rs:74:25
239
239
240
240
error[E0080]: could not evaluate static initializer
0 commit comments