@@ -7,10 +7,10 @@ LL | &*ptr::slice_from_raw_parts(data, len)
77 | dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
88 | inside `std::slice::from_raw_parts::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
99 |
10- ::: $DIR/forbidden_slices.rs:18 :34
10+ ::: $DIR/forbidden_slices.rs:19 :34
1111 |
1212LL | pub static S0: &[u32] = unsafe { from_raw_parts(ptr::null(), 0) };
13- | ------------------------------ inside `S0` at $DIR/forbidden_slices.rs:18 :34
13+ | ------------------------------ inside `S0` at $DIR/forbidden_slices.rs:19 :34
1414
1515error[E0080]: could not evaluate static initializer
1616 --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -21,10 +21,10 @@ LL | &*ptr::slice_from_raw_parts(data, len)
2121 | dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
2222 | inside `std::slice::from_raw_parts::<'_, ()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
2323 |
24- ::: $DIR/forbidden_slices.rs:19 :33
24+ ::: $DIR/forbidden_slices.rs:20 :33
2525 |
2626LL | pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
27- | ------------------------------ inside `S1` at $DIR/forbidden_slices.rs:19 :33
27+ | ------------------------------ inside `S1` at $DIR/forbidden_slices.rs:20 :33
2828
2929error[E0080]: could not evaluate static initializer
3030 --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@@ -35,13 +35,13 @@ LL | &*ptr::slice_from_raw_parts(data, len)
3535 | dereferencing pointer failed: ALLOC_ID has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
3636 | inside `std::slice::from_raw_parts::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
3737 |
38- ::: $DIR/forbidden_slices.rs:22 :34
38+ ::: $DIR/forbidden_slices.rs:23 :34
3939 |
4040LL | pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
41- | ---------------------- inside `S2` at $DIR/forbidden_slices.rs:22 :34
41+ | ---------------------- inside `S2` at $DIR/forbidden_slices.rs:23 :34
4242
4343error[E0080]: it is undefined behavior to use this value
44- --> $DIR/forbidden_slices.rs:25 :1
44+ --> $DIR/forbidden_slices.rs:26 :1
4545 |
4646LL | pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) };
4747 | ^^^^^^^^^^^^^^^^^^^^ 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) }
5252 }
5353
5454error[E0080]: it is undefined behavior to use this value
55- --> $DIR/forbidden_slices.rs:27 :1
55+ --> $DIR/forbidden_slices.rs:28 :1
5656 |
5757LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) };
5858 | ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
@@ -64,7 +64,7 @@ LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size
6464 }
6565
6666error[E0080]: it is undefined behavior to use this value
67- --> $DIR/forbidden_slices.rs:29 :1
67+ --> $DIR/forbidden_slices.rs:30 :1
6868 |
6969LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
7070 | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
@@ -75,7 +75,7 @@ LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4)
7575 }
7676
7777error[E0080]: it is undefined behavior to use this value
78- --> $DIR/forbidden_slices.rs:32 :1
78+ --> $DIR/forbidden_slices.rs:33 :1
7979 |
8080LL | pub static S7: &[u16] = unsafe {
8181 | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
@@ -94,10 +94,10 @@ LL | &*ptr::slice_from_raw_parts(data, len)
9494 | dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
9595 | inside `std::slice::from_raw_parts::<'_, u64>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
9696 |
97- ::: $DIR/forbidden_slices.rs:43 :5
97+ ::: $DIR/forbidden_slices.rs:44 :5
9898 |
9999LL | from_raw_parts(ptr, 1)
100- | ---------------------- inside `S8` at $DIR/forbidden_slices.rs:43 :5
100+ | ---------------------- inside `S8` at $DIR/forbidden_slices.rs:44 :5
101101
102102error[E0080]: could not evaluate static initializer
103103 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -113,10 +113,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
113113LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
114114 | ------------------------------ inside `from_ptr_range::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
115115 |
116- ::: $DIR/forbidden_slices.rs:46 :34
116+ ::: $DIR/forbidden_slices.rs:47 :34
117117 |
118118LL | pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
119- | ---------------------------------------- inside `R0` at $DIR/forbidden_slices.rs:46 :34
119+ | ---------------------------------------- inside `R0` at $DIR/forbidden_slices.rs:47 :34
120120
121121error[E0080]: could not evaluate static initializer
122122 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -132,10 +132,10 @@ LL | assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
132132LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
133133 | ------------------------------ inside `from_ptr_range::<'_, ()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
134134 |
135- ::: $DIR/forbidden_slices.rs:47 :33
135+ ::: $DIR/forbidden_slices.rs:48 :33
136136 |
137137LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
138- | ---------------------------------------- inside `R1` at $DIR/forbidden_slices.rs:47 :33
138+ | ---------------------------------------- inside `R1` at $DIR/forbidden_slices.rs:48 :33
139139 |
140140 = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
141141
@@ -151,13 +151,13 @@ LL | unsafe { intrinsics::offset(self, count) }
151151LL | unsafe { self.offset(count as isize) }
152152 | --------------------------- inside `ptr::const_ptr::<impl *const u32>::add` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
153153 |
154- ::: $DIR/forbidden_slices.rs:50 :25
154+ ::: $DIR/forbidden_slices.rs:51 :25
155155 |
156156LL | 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
158158
159159error[E0080]: it is undefined behavior to use this value
160- --> $DIR/forbidden_slices.rs:52 :1
160+ --> $DIR/forbidden_slices.rs:53 :1
161161 |
162162LL | pub static R4: &[u8] = unsafe {
163163 | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
@@ -168,7 +168,7 @@ LL | pub static R4: &[u8] = unsafe {
168168 }
169169
170170error[E0080]: it is undefined behavior to use this value
171- --> $DIR/forbidden_slices.rs:57 :1
171+ --> $DIR/forbidden_slices.rs:58 :1
172172 |
173173LL | pub static R5: &[u8] = unsafe {
174174 | ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
@@ -180,7 +180,7 @@ LL | pub static R5: &[u8] = unsafe {
180180 }
181181
182182error[E0080]: it is undefined behavior to use this value
183- --> $DIR/forbidden_slices.rs:62 :1
183+ --> $DIR/forbidden_slices.rs:63 :1
184184 |
185185LL | pub static R6: &[bool] = unsafe {
186186 | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
@@ -191,7 +191,7 @@ LL | pub static R6: &[bool] = unsafe {
191191 }
192192
193193error[E0080]: it is undefined behavior to use this value
194- --> $DIR/forbidden_slices.rs:67 :1
194+ --> $DIR/forbidden_slices.rs:68 :1
195195 |
196196LL | pub static R7: &[u16] = unsafe {
197197 | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
@@ -213,10 +213,10 @@ LL | unsafe { intrinsics::offset(self, count) }
213213LL | unsafe { self.offset(count as isize) }
214214 | --------------------------- inside `ptr::const_ptr::<impl *const u64>::add` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
215215 |
216- ::: $DIR/forbidden_slices.rs:74 :25
216+ ::: $DIR/forbidden_slices.rs:75 :25
217217 |
218218LL | from_ptr_range(ptr..ptr.add(1))
219- | ---------- inside `R8` at $DIR/forbidden_slices.rs:74 :25
219+ | ---------- inside `R8` at $DIR/forbidden_slices.rs:75 :25
220220
221221error[E0080]: could not evaluate static initializer
222222 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -232,10 +232,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
232232LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
233233 | ------------------------------ inside `from_ptr_range::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
234234 |
235- ::: $DIR/forbidden_slices.rs:79 :34
235+ ::: $DIR/forbidden_slices.rs:80 :34
236236 |
237237LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).add(1)) };
238- | ----------------------------------------------- inside `R9` at $DIR/forbidden_slices.rs:79 :34
238+ | ----------------------------------------------- inside `R9` at $DIR/forbidden_slices.rs:80 :34
239239
240240error[E0080]: could not evaluate static initializer
241241 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -251,10 +251,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
251251LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
252252 | ------------------------------ inside `from_ptr_range::<'_, u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
253253 |
254- ::: $DIR/forbidden_slices.rs:80 :35
254+ ::: $DIR/forbidden_slices.rs:81 :35
255255 |
256256LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
257- | ------------------------ inside `R10` at $DIR/forbidden_slices.rs:80 :35
257+ | ------------------------ inside `R10` at $DIR/forbidden_slices.rs:81 :35
258258
259259error: aborting due to 18 previous errors
260260
0 commit comments