@@ -7,10 +7,10 @@ LL | &*ptr::slice_from_raw_parts(data, len)
7
7
| dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
8
8
| inside `std::slice::from_raw_parts::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
9
9
|
10
- ::: $DIR/forbidden_slices.rs:19 :34
10
+ ::: $DIR/forbidden_slices.rs:18 :34
11
11
|
12
12
LL | pub static S0: &[u32] = unsafe { from_raw_parts(ptr::null(), 0) };
13
- | ------------------------------ inside `S0` at $DIR/forbidden_slices.rs:19 :34
13
+ | ------------------------------ inside `S0` at $DIR/forbidden_slices.rs:18 :34
14
14
15
15
error[E0080]: could not evaluate static initializer
16
16
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -21,10 +21,10 @@ LL | &*ptr::slice_from_raw_parts(data, len)
21
21
| dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
22
22
| inside `std::slice::from_raw_parts::<()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
23
23
|
24
- ::: $DIR/forbidden_slices.rs:20 :33
24
+ ::: $DIR/forbidden_slices.rs:19 :33
25
25
|
26
26
LL | pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
27
- | ------------------------------ inside `S1` at $DIR/forbidden_slices.rs:20 :33
27
+ | ------------------------------ inside `S1` at $DIR/forbidden_slices.rs:19 :33
28
28
29
29
error[E0080]: could not evaluate static initializer
30
30
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -35,13 +35,13 @@ LL | &*ptr::slice_from_raw_parts(data, len)
35
35
| dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
36
36
| inside `std::slice::from_raw_parts::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
37
37
|
38
- ::: $DIR/forbidden_slices.rs:23 :34
38
+ ::: $DIR/forbidden_slices.rs:22 :34
39
39
|
40
40
LL | pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
41
- | ---------------------- inside `S2` at $DIR/forbidden_slices.rs:23 :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:26 :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
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
@@ -52,7 +52,7 @@ LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) }
52
52
}
53
53
54
54
error[E0080]: it is undefined behavior to use this value
55
- --> $DIR/forbidden_slices.rs:28 :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
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value 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:30 :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
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value 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:33 :1
77
+ --> $DIR/forbidden_slices.rs:32 :1
78
78
|
79
79
LL | pub static S7: &[u16] = unsafe {
80
80
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
@@ -93,10 +93,10 @@ LL | &*ptr::slice_from_raw_parts(data, len)
93
93
| dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
94
94
| inside `std::slice::from_raw_parts::<u64>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
95
95
|
96
- ::: $DIR/forbidden_slices.rs:44 :5
96
+ ::: $DIR/forbidden_slices.rs:43 :5
97
97
|
98
98
LL | from_raw_parts(ptr, 1)
99
- | ---------------------- inside `S8` at $DIR/forbidden_slices.rs:44 :5
99
+ | ---------------------- inside `S8` at $DIR/forbidden_slices.rs:43 :5
100
100
101
101
error[E0080]: could not evaluate static initializer
102
102
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -112,10 +112,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
112
112
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
113
113
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
114
114
|
115
- ::: $DIR/forbidden_slices.rs:47 :34
115
+ ::: $DIR/forbidden_slices.rs:46 :34
116
116
|
117
117
LL | pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
118
- | ---------------------------------------- inside `R0` at $DIR/forbidden_slices.rs:47 :34
118
+ | ---------------------------------------- inside `R0` at $DIR/forbidden_slices.rs:46 :34
119
119
120
120
error[E0080]: could not evaluate static initializer
121
121
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -131,10 +131,10 @@ LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
131
131
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
132
132
| ------------------------------ inside `from_ptr_range::<()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
133
133
|
134
- ::: $DIR/forbidden_slices.rs:48 :33
134
+ ::: $DIR/forbidden_slices.rs:47 :33
135
135
|
136
136
LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
137
- | ---------------------------------------- inside `R1` at $DIR/forbidden_slices.rs:48 :33
137
+ | ---------------------------------------- inside `R1` at $DIR/forbidden_slices.rs:47 :33
138
138
|
139
139
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
140
140
@@ -150,13 +150,13 @@ LL | unsafe { intrinsics::offset(self, count) }
150
150
LL | unsafe { self.offset(count as isize) }
151
151
| --------------------------- inside `ptr::const_ptr::<impl *const u32>::add` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
152
152
|
153
- ::: $DIR/forbidden_slices.rs:51 :25
153
+ ::: $DIR/forbidden_slices.rs:50 :25
154
154
|
155
155
LL | from_ptr_range(ptr..ptr.add(2))
156
- | ---------- inside `R2` at $DIR/forbidden_slices.rs:51 :25
156
+ | ---------- inside `R2` at $DIR/forbidden_slices.rs:50 :25
157
157
158
158
error[E0080]: it is undefined behavior to use this value
159
- --> $DIR/forbidden_slices.rs:53 :1
159
+ --> $DIR/forbidden_slices.rs:52 :1
160
160
|
161
161
LL | pub static R4: &[u8] = unsafe {
162
162
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
@@ -167,7 +167,7 @@ LL | pub static R4: &[u8] = unsafe {
167
167
}
168
168
169
169
error[E0080]: it is undefined behavior to use this value
170
- --> $DIR/forbidden_slices.rs:58 :1
170
+ --> $DIR/forbidden_slices.rs:57 :1
171
171
|
172
172
LL | pub static R5: &[u8] = unsafe {
173
173
| ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
@@ -178,7 +178,7 @@ LL | pub static R5: &[u8] = unsafe {
178
178
}
179
179
180
180
error[E0080]: it is undefined behavior to use this value
181
- --> $DIR/forbidden_slices.rs:63 :1
181
+ --> $DIR/forbidden_slices.rs:62 :1
182
182
|
183
183
LL | pub static R6: &[bool] = unsafe {
184
184
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
@@ -189,7 +189,7 @@ LL | pub static R6: &[bool] = unsafe {
189
189
}
190
190
191
191
error[E0080]: it is undefined behavior to use this value
192
- --> $DIR/forbidden_slices.rs:68 :1
192
+ --> $DIR/forbidden_slices.rs:67 :1
193
193
|
194
194
LL | pub static R7: &[u16] = unsafe {
195
195
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
@@ -211,10 +211,10 @@ LL | unsafe { intrinsics::offset(self, count) }
211
211
LL | unsafe { self.offset(count as isize) }
212
212
| --------------------------- inside `ptr::const_ptr::<impl *const u64>::add` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
213
213
|
214
- ::: $DIR/forbidden_slices.rs:75 :25
214
+ ::: $DIR/forbidden_slices.rs:74 :25
215
215
|
216
216
LL | from_ptr_range(ptr..ptr.add(1))
217
- | ---------- inside `R8` at $DIR/forbidden_slices.rs:75 :25
217
+ | ---------- inside `R8` at $DIR/forbidden_slices.rs:74 :25
218
218
219
219
error[E0080]: could not evaluate static initializer
220
220
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -230,10 +230,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
230
230
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
231
231
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
232
232
|
233
- ::: $DIR/forbidden_slices.rs:80 :34
233
+ ::: $DIR/forbidden_slices.rs:79 :34
234
234
|
235
235
LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).add(1)) };
236
- | ----------------------------------------------- inside `R9` at $DIR/forbidden_slices.rs:80 :34
236
+ | ----------------------------------------------- inside `R9` at $DIR/forbidden_slices.rs:79 :34
237
237
238
238
error[E0080]: could not evaluate static initializer
239
239
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -249,10 +249,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
249
249
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
250
250
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
251
251
|
252
- ::: $DIR/forbidden_slices.rs:81 :35
252
+ ::: $DIR/forbidden_slices.rs:80 :35
253
253
|
254
254
LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
255
- | ------------------------ inside `R10` at $DIR/forbidden_slices.rs:81 :35
255
+ | ------------------------ inside `R10` at $DIR/forbidden_slices.rs:80 :35
256
256
257
257
error: aborting due to 18 previous errors
258
258
0 commit comments