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
The number of line drawing characters depends on the number of digits
in the allocation number. This removes the characters to avoid
spurious failures.
| ---------------------- inside `S2` at $DIR/forbidden_slices.rs:22:34
41
+
| ---------------------- inside `S2` at $DIR/forbidden_slices.rs:23:34
42
42
43
43
error[E0080]: it is undefined behavior to use this value
44
-
--> $DIR/forbidden_slices.rs:25:1
44
+
--> $DIR/forbidden_slices.rs:26:1
45
45
|
46
46
LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
47
47
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value 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
-
╾─ALLOC_ID─╼ 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: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
| ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
59
59
|
60
60
= help: this code performed an operation that depends on the underlying bytes representing a pointer
61
61
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
62
62
= note: the raw bytes of the constant (size: 8, align: 4) {
63
-
╾─ALLOC_ID─╼ 04 00 00 00 │ ╾──╼....
63
+
╾ALLOC_ID╼ 04 00 00 00 │ ╾╼....
64
64
}
65
65
66
66
error[E0080]: it is undefined behavior to use this value
67
-
--> $DIR/forbidden_slices.rs:29:1
67
+
--> $DIR/forbidden_slices.rs:30:1
68
68
|
69
69
LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
70
70
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
71
71
|
72
72
= 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.
73
73
= note: the raw bytes of the constant (size: 8, align: 4) {
74
-
╾─ALLOC_ID─╼ 04 00 00 00 │ ╾──╼....
74
+
╾ALLOC_ID╼ 04 00 00 00 │ ╾╼....
75
75
}
76
76
77
77
error[E0080]: it is undefined behavior to use this value
78
-
--> $DIR/forbidden_slices.rs:32:1
78
+
--> $DIR/forbidden_slices.rs:33:1
79
79
|
80
80
LL | pub static S7: &[u16] = unsafe {
81
81
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
82
82
|
83
83
= 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.
84
84
= note: the raw bytes of the constant (size: 8, align: 4) {
85
-
╾─A_ID+0x1─╼ 04 00 00 00 │ ╾──╼....
85
+
╾A_ID+0x1╼ 04 00 00 00 │ ╾╼....
86
86
}
87
87
88
88
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
153
153
|
154
-
::: $DIR/forbidden_slices.rs:50:25
154
+
::: $DIR/forbidden_slices.rs:51:25
155
155
|
156
156
LL | from_ptr_range(ptr..ptr.add(2))
157
-
| ---------- inside `R2` at $DIR/forbidden_slices.rs:50:25
157
+
| ---------- inside `R2` at $DIR/forbidden_slices.rs:51:25
158
158
159
159
error[E0080]: it is undefined behavior to use this value
160
-
--> $DIR/forbidden_slices.rs:52:1
160
+
--> $DIR/forbidden_slices.rs:53:1
161
161
|
162
162
LL | pub static R4: &[u8] = unsafe {
163
163
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
164
164
|
165
165
= 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.
166
166
= note: the raw bytes of the constant (size: 8, align: 4) {
167
-
╾ALLOC_ID─╼ 01 00 00 00 │ ╾──╼....
167
+
╾ALLOC_ID╼ 01 00 00 00 │ ╾╼....
168
168
}
169
169
170
170
error[E0080]: it is undefined behavior to use this value
171
-
--> $DIR/forbidden_slices.rs:57:1
171
+
--> $DIR/forbidden_slices.rs:58:1
172
172
|
173
173
LL | pub static R5: &[u8] = unsafe {
174
174
| ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
175
175
|
176
176
= help: this code performed an operation that depends on the underlying bytes representing a pointer
177
177
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
178
178
= note: the raw bytes of the constant (size: 8, align: 4) {
179
-
╾ALLOC_ID─╼ 04 00 00 00 │ ╾──╼....
179
+
╾ALLOC_ID╼ 04 00 00 00 │ ╾╼....
180
180
}
181
181
182
182
error[E0080]: it is undefined behavior to use this value
183
-
--> $DIR/forbidden_slices.rs:62:1
183
+
--> $DIR/forbidden_slices.rs:63:1
184
184
|
185
185
LL | pub static R6: &[bool] = unsafe {
186
186
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
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
-
╾ALLOC_ID─╼ 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:67:1
194
+
--> $DIR/forbidden_slices.rs:68:1
195
195
|
196
196
LL | pub static R7: &[u16] = unsafe {
197
197
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
198
198
|
199
199
= 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.
200
200
= note: the raw bytes of the constant (size: 8, align: 4) {
201
-
╾A_ID+0x1─╼ 04 00 00 00 │ ╾──╼....
201
+
╾A_ID+0x1╼ 04 00 00 00 │ ╾╼....
202
202
}
203
203
204
204
error[E0080]: could not evaluate static initializer
0 commit comments