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
error[E0080]: it is undefined behavior to use this value
55
-
--> $DIR/forbidden_slices.rs:27:1
55
+
--> $DIR/forbidden_slices.rs:28: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
@@ -63,7 +63,7 @@ LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size
63
63
}
64
64
65
65
error[E0080]: it is undefined behavior to use this value
66
-
--> $DIR/forbidden_slices.rs:29:1
66
+
--> $DIR/forbidden_slices.rs:30: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
@@ -74,7 +74,7 @@ LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4)
74
74
}
75
75
76
76
error[E0080]: it is undefined behavior to use this value
77
-
--> $DIR/forbidden_slices.rs:32:1
77
+
--> $DIR/forbidden_slices.rs:33:1
78
78
|
79
79
LL | / pub static S7: &[u16] = unsafe {
80
80
LL | |
@@ -86,7 +86,7 @@ LL | | };
86
86
|
87
87
= 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.
88
88
= note: the raw bytes of the constant (size: 8, align: 4) {
89
-
╾─a79+0x1─╼ 04 00 00 00 │ ╾──╼....
89
+
╾─A_ID+0x1─╼ 04 00 00 00 │ ╾──╼....
90
90
}
91
91
92
92
error[E0080]: could not evaluate static initializer
| --------------------------- 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:50:25
158
+
::: $DIR/forbidden_slices.rs:51:25
159
159
|
160
160
LL | from_ptr_range(ptr..ptr.add(2))
161
-
| ---------- inside `R2` at $DIR/forbidden_slices.rs:50:25
161
+
| ---------- inside `R2` at $DIR/forbidden_slices.rs:51:25
162
162
163
163
error[E0080]: it is undefined behavior to use this value
164
-
--> $DIR/forbidden_slices.rs:52:1
164
+
--> $DIR/forbidden_slices.rs:53:1
165
165
|
166
166
LL | / pub static R4: &[u8] = unsafe {
167
167
LL | |
@@ -176,7 +176,7 @@ LL | | };
176
176
}
177
177
178
178
error[E0080]: it is undefined behavior to use this value
179
-
--> $DIR/forbidden_slices.rs:57:1
179
+
--> $DIR/forbidden_slices.rs:58:1
180
180
|
181
181
LL | / pub static R5: &[u8] = unsafe {
182
182
LL | |
@@ -191,7 +191,7 @@ LL | | };
191
191
}
192
192
193
193
error[E0080]: it is undefined behavior to use this value
194
-
--> $DIR/forbidden_slices.rs:62:1
194
+
--> $DIR/forbidden_slices.rs:63:1
195
195
|
196
196
LL | / pub static R6: &[bool] = unsafe {
197
197
LL | |
@@ -206,7 +206,7 @@ LL | | };
206
206
}
207
207
208
208
error[E0080]: it is undefined behavior to use this value
209
-
--> $DIR/forbidden_slices.rs:67:1
209
+
--> $DIR/forbidden_slices.rs:68:1
210
210
|
211
211
LL | / pub static R7: &[u16] = unsafe {
212
212
LL | |
@@ -217,7 +217,7 @@ LL | | };
217
217
|
218
218
= 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.
219
219
= note: the raw bytes of the constant (size: 8, align: 4) {
220
-
╾a209+0x1─╼ 04 00 00 00 │ ╾──╼....
220
+
╾A_ID+0x1─╼ 04 00 00 00 │ ╾──╼....
221
221
}
222
222
223
223
error[E0080]: could not evaluate static initializer
0 commit comments