You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: pointer must be in-bounds for 12 bytes at offset N, but allocN has size N
305
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: allocN has size N, so pointer to 12 bytes starting at offset N is out-of-bounds
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: pointer must be in-bounds for 24 bytes at offset N, but allocN has size N
305
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: allocN has size N, so pointer to 24 bytes starting at offset N is out-of-bounds
Copy file name to clipboardExpand all lines: src/test/ui/consts/ptr_comparisons.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ error[E0080]: evaluation of constant value failed
4
4
LL | unsafe { intrinsics::offset(self, count) }
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
| |
7
-
| pointer arithmetic failed: pointer must be in-bounds for $TWO_WORDS bytes at offset 0, but alloc3 has size $WORD
7
+
| pointer arithmetic failed: alloc3 has size $WORD, so pointer to $TWO_WORDS bytes starting at offset 0 is out-of-bounds
8
8
| inside `ptr::const_ptr::<impl *const usize>::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
9
9
|
10
10
::: $DIR/ptr_comparisons.rs:61:34
@@ -16,7 +16,7 @@ error[E0080]: evaluation of constant value failed
16
16
--> $DIR/ptr_comparisons.rs:64:33
17
17
|
18
18
LL | unsafe { std::ptr::addr_of!((*(FOO as *const usize as *const [u8; 1000]))[999]) };
19
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: pointer must be in-bounds for 1000 bytes at offset 0, but alloc3 has size $WORD
19
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: alloc3 has size $WORD, so pointer to 1000 bytes starting at offset 0 is out-of-bounds
0 commit comments