@@ -4,39 +4,39 @@ error: any use of this value will cause an error
4
4
LL | unsafe { intrinsics::offset(self, count) }
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
| |
7
- | inbounds test failed: pointer must be in-bounds at offset 16 , but is outside bounds of alloc2 which has size 8
7
+ | inbounds test failed: pointer must be in-bounds at offset $TWO_WORDS , but is outside bounds of alloc2 which has size $WORD
8
8
| inside `std::ptr::const_ptr::<impl *const usize>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
9
- | inside `_` at $DIR/ptr_comparisons.rs:58 :34
9
+ | inside `_` at $DIR/ptr_comparisons.rs:62 :34
10
10
|
11
- ::: $DIR/ptr_comparisons.rs:58 :1
11
+ ::: $DIR/ptr_comparisons.rs:62 :1
12
12
|
13
13
LL | const _: *const usize = unsafe { (FOO as *const usize).offset(2) };
14
14
| -------------------------------------------------------------------
15
15
|
16
16
= note: `#[deny(const_err)]` on by default
17
17
18
18
error: any use of this value will cause an error
19
- --> $DIR/ptr_comparisons.rs:63 :14
19
+ --> $DIR/ptr_comparisons.rs:67 :14
20
20
|
21
21
LL | / const _: *const u8 =
22
22
LL | |
23
23
LL | | unsafe { std::ptr::raw_const!((*(FOO as *const usize as *const [u8; 1000]))[999]) };
24
24
| |______________^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^__-
25
25
| |
26
- | memory access failed: pointer must be in-bounds at offset 1000, but is outside bounds of alloc2 which has size 8
26
+ | memory access failed: pointer must be in-bounds at offset 1000, but is outside bounds of alloc2 which has size $WORD
27
27
|
28
28
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
29
29
30
30
error: any use of this value will cause an error
31
- --> $DIR/ptr_comparisons.rs:66 :27
31
+ --> $DIR/ptr_comparisons.rs:70 :27
32
32
|
33
33
LL | const _: usize = unsafe { std::mem::transmute::<*const usize, usize>(FOO) + 4 };
34
34
| --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
35
35
| |
36
36
| "pointer-to-integer cast" needs an rfc before being allowed inside constants
37
37
38
38
error: any use of this value will cause an error
39
- --> $DIR/ptr_comparisons.rs:71 :27
39
+ --> $DIR/ptr_comparisons.rs:75 :27
40
40
|
41
41
LL | const _: usize = unsafe { *std::mem::transmute::<&&usize, &usize>(&FOO) + 4 };
42
42
| --------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
0 commit comments