@@ -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:19 :34
10+ ::: $DIR/forbidden_slices.rs:18 :34
1111 |
1212LL | 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
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:20 :33
24+ ::: $DIR/forbidden_slices.rs:19 :33
2525 |
2626LL | 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
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:23 :34
38+ ::: $DIR/forbidden_slices.rs:22 :34
3939 |
4040LL | 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
4242
4343error[E0080]: it is undefined behavior to use this value
44- --> $DIR/forbidden_slices.rs:26 :1
44+ --> $DIR/forbidden_slices.rs:25 :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:28 :1
55+ --> $DIR/forbidden_slices.rs:27 :1
5656 |
5757LL | pub static S5: &[u8] = unsafe { from_raw_parts((&D3) as *const _ as _, size_of::<&u32>()) };
5858 | ^^^^^^^^^^^^^^^^^^^^ 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
6363 }
6464
6565error[E0080]: it is undefined behavior to use this value
66- --> $DIR/forbidden_slices.rs:30 :1
66+ --> $DIR/forbidden_slices.rs:29 :1
6767 |
6868LL | pub static S6: &[bool] = unsafe { from_raw_parts((&D0) as *const _ as _, 4) };
6969 | ^^^^^^^^^^^^^^^^^^^^^^ 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)
7474 }
7575
7676error[E0080]: it is undefined behavior to use this value
77- --> $DIR/forbidden_slices.rs:33 :1
77+ --> $DIR/forbidden_slices.rs:32 :1
7878 |
7979LL | pub static S7: &[u16] = unsafe {
8080 | ^^^^^^^^^^^^^^^^^^^^^ 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)
9393 | dereferencing pointer failed: ALLOC_ID has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
9494 | inside `std::slice::from_raw_parts::<u64>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
9595 |
96- ::: $DIR/forbidden_slices.rs:44 :5
96+ ::: $DIR/forbidden_slices.rs:43 :5
9797 |
9898LL | 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
100100
101101error[E0080]: could not evaluate static initializer
102102 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -112,10 +112,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
112112LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
113113 | ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
114114 |
115- ::: $DIR/forbidden_slices.rs:47 :34
115+ ::: $DIR/forbidden_slices.rs:46 :34
116116 |
117117LL | 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
119119
120120error[E0080]: could not evaluate static initializer
121121 --> $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);
131131LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
132132 | ------------------------------ inside `from_ptr_range::<()>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
133133 |
134- ::: $DIR/forbidden_slices.rs:48 :33
134+ ::: $DIR/forbidden_slices.rs:47 :33
135135 |
136136LL | 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
138138 |
139139 = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
140140
@@ -150,13 +150,13 @@ LL | unsafe { intrinsics::offset(self, count) }
150150LL | unsafe { self.offset(count as isize) }
151151 | --------------------------- inside `ptr::const_ptr::<impl *const u32>::add` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
152152 |
153- ::: $DIR/forbidden_slices.rs:51 :25
153+ ::: $DIR/forbidden_slices.rs:50 :25
154154 |
155155LL | 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
157157
158158error[E0080]: it is undefined behavior to use this value
159- --> $DIR/forbidden_slices.rs:53 :1
159+ --> $DIR/forbidden_slices.rs:52 :1
160160 |
161161LL | pub static R4: &[u8] = unsafe {
162162 | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized bytes
@@ -167,7 +167,7 @@ LL | pub static R4: &[u8] = unsafe {
167167 }
168168
169169error[E0080]: it is undefined behavior to use this value
170- --> $DIR/forbidden_slices.rs:58 :1
170+ --> $DIR/forbidden_slices.rs:57 :1
171171 |
172172LL | pub static R5: &[u8] = unsafe {
173173 | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered a pointer, but expected plain (non-pointer) bytes
@@ -178,7 +178,7 @@ LL | pub static R5: &[u8] = unsafe {
178178 }
179179
180180error[E0080]: it is undefined behavior to use this value
181- --> $DIR/forbidden_slices.rs:63 :1
181+ --> $DIR/forbidden_slices.rs:62 :1
182182 |
183183LL | pub static R6: &[bool] = unsafe {
184184 | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
@@ -189,7 +189,7 @@ LL | pub static R6: &[bool] = unsafe {
189189 }
190190
191191error[E0080]: it is undefined behavior to use this value
192- --> $DIR/forbidden_slices.rs:68 :1
192+ --> $DIR/forbidden_slices.rs:67 :1
193193 |
194194LL | pub static R7: &[u16] = unsafe {
195195 | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
@@ -211,10 +211,10 @@ LL | unsafe { intrinsics::offset(self, count) }
211211LL | unsafe { self.offset(count as isize) }
212212 | --------------------------- inside `ptr::const_ptr::<impl *const u64>::add` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
213213 |
214- ::: $DIR/forbidden_slices.rs:75 :25
214+ ::: $DIR/forbidden_slices.rs:74 :25
215215 |
216216LL | 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
218218
219219error[E0080]: could not evaluate static initializer
220220 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -230,10 +230,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
230230LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
231231 | ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
232232 |
233- ::: $DIR/forbidden_slices.rs:80 :34
233+ ::: $DIR/forbidden_slices.rs:79 :34
234234 |
235235LL | 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
237237
238238error[E0080]: could not evaluate static initializer
239239 --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -249,10 +249,10 @@ LL | unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) }
249249LL | unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
250250 | ------------------------------ inside `from_ptr_range::<u32>` at $SRC_DIR/core/src/slice/raw.rs:LL:COL
251251 |
252- ::: $DIR/forbidden_slices.rs:81 :35
252+ ::: $DIR/forbidden_slices.rs:80 :35
253253 |
254254LL | 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
256256
257257error: aborting due to 18 previous errors
258258
0 commit comments