@@ -7,10 +7,10 @@ LL | &*ptr::slice_from_raw_parts(data, len)
7
7
| dereferencing pointer failed: null pointer is not a valid pointer
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:15 :34
10
+ ::: $DIR/forbidden_slices.rs:16 :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:15 :34
13
+ | ------------------------------ inside `S0` at $DIR/forbidden_slices.rs:16 :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 not a valid pointer
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:16 :33
24
+ ::: $DIR/forbidden_slices.rs:17 :33
25
25
|
26
26
LL | pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
27
- | ------------------------------ inside `S1` at $DIR/forbidden_slices.rs:16 :33
27
+ | ------------------------------ inside `S1` at $DIR/forbidden_slices.rs:17 :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: alloc26 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:19 :34
38
+ ::: $DIR/forbidden_slices.rs:20 :34
39
39
|
40
40
LL | pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
41
- | ---------------------- inside `S2` at $DIR/forbidden_slices.rs:19 :34
41
+ | ---------------------- inside `S2` at $DIR/forbidden_slices.rs:20 :34
42
42
43
43
error[E0080]: it is undefined behavior to use this value
44
- --> $DIR/forbidden_slices.rs:22 :1
44
+ --> $DIR/forbidden_slices.rs:23 :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
@@ -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:24 :1
55
+ --> $DIR/forbidden_slices.rs:25 :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:26 :1
66
+ --> $DIR/forbidden_slices.rs:27 :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:29 :1
77
+ --> $DIR/forbidden_slices.rs:30 :1
78
78
|
79
79
LL | / pub static S7: &[u16] = unsafe {
80
80
LL | |
@@ -98,10 +98,10 @@ LL | &*ptr::slice_from_raw_parts(data, len)
98
98
| dereferencing pointer failed: alloc96 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:40 :5
101
+ ::: $DIR/forbidden_slices.rs:41 :5
102
102
|
103
103
LL | from_raw_parts(ptr, 1)
104
- | ---------------------- inside `S8` at $DIR/forbidden_slices.rs:40 :5
104
+ | ---------------------- inside `S8` at $DIR/forbidden_slices.rs:41 :5
105
105
106
106
error[E0080]: could not evaluate static initializer
107
107
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -117,10 +117,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
117
117
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
118
118
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
119
119
|
120
- ::: $DIR/forbidden_slices.rs:43 :34
120
+ ::: $DIR/forbidden_slices.rs:44 :34
121
121
|
122
122
LL | pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
123
- | ---------------------------------------- inside `R0` at $DIR/forbidden_slices.rs:43 :34
123
+ | ---------------------------------------- inside `R0` at $DIR/forbidden_slices.rs:44 :34
124
124
125
125
error[E0080]: could not evaluate static initializer
126
126
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -136,10 +136,10 @@ LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
136
136
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
137
137
| ------------------------------ inside `from_ptr_range::<()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
138
138
|
139
- ::: $DIR/forbidden_slices.rs:44 :33
139
+ ::: $DIR/forbidden_slices.rs:45 :33
140
140
|
141
141
LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
142
- | ---------------------------------------- inside `R1` at $DIR/forbidden_slices.rs:44 :33
142
+ | ---------------------------------------- inside `R1` at $DIR/forbidden_slices.rs:45 :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
@@ -155,13 +155,13 @@ LL | unsafe { intrinsics::offset(self, count) }
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:47 :25
158
+ ::: $DIR/forbidden_slices.rs:48 :25
159
159
|
160
160
LL | from_ptr_range(ptr..ptr.add(2))
161
- | ---------- inside `R2` at $DIR/forbidden_slices.rs:47 :25
161
+ | ---------- inside `R2` at $DIR/forbidden_slices.rs:48 :25
162
162
163
163
error[E0080]: it is undefined behavior to use this value
164
- --> $DIR/forbidden_slices.rs:49 :1
164
+ --> $DIR/forbidden_slices.rs:50 :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:54 :1
179
+ --> $DIR/forbidden_slices.rs:55 :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:59 :1
194
+ --> $DIR/forbidden_slices.rs:60 :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:64 :1
209
+ --> $DIR/forbidden_slices.rs:65 :1
210
210
|
211
211
LL | / pub static R7: &[u16] = unsafe {
212
212
LL | |
@@ -232,10 +232,10 @@ LL | unsafe { intrinsics::offset(self, count) }
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:71 :25
235
+ ::: $DIR/forbidden_slices.rs:72 :25
236
236
|
237
237
LL | from_ptr_range(ptr..ptr.add(1))
238
- | ---------- inside `R8` at $DIR/forbidden_slices.rs:71 :25
238
+ | ---------- inside `R8` at $DIR/forbidden_slices.rs:72 :25
239
239
240
240
error[E0080]: could not evaluate static initializer
241
241
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -251,10 +251,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
251
251
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
252
252
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
253
253
|
254
- ::: $DIR/forbidden_slices.rs:76 :34
254
+ ::: $DIR/forbidden_slices.rs:77 :34
255
255
|
256
256
LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).add(1)) };
257
- | ----------------------------------------------- inside `R9` at $DIR/forbidden_slices.rs:76 :34
257
+ | ----------------------------------------------- inside `R9` at $DIR/forbidden_slices.rs:77 :34
258
258
259
259
error[E0080]: could not evaluate static initializer
260
260
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -270,10 +270,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
270
270
LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
271
271
| ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
272
272
|
273
- ::: $DIR/forbidden_slices.rs:77 :35
273
+ ::: $DIR/forbidden_slices.rs:78 :35
274
274
|
275
275
LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
276
- | ------------------------ inside `R10` at $DIR/forbidden_slices.rs:77 :35
276
+ | ------------------------ inside `R10` at $DIR/forbidden_slices.rs:78 :35
277
277
278
278
error: aborting due to 18 previous errors
279
279
0 commit comments