diff options
Diffstat (limited to 'tests/ui/consts/const-eval/raw-pointer-ub.stderr')
| -rw-r--r-- | tests/ui/consts/const-eval/raw-pointer-ub.stderr | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/ui/consts/const-eval/raw-pointer-ub.stderr b/tests/ui/consts/const-eval/raw-pointer-ub.stderr index c3360c8b3e2..4fff293b2ee 100644 --- a/tests/ui/consts/const-eval/raw-pointer-ub.stderr +++ b/tests/ui/consts/const-eval/raw-pointer-ub.stderr @@ -11,28 +11,24 @@ LL | *ptr = 0; | ^^^^^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required error[E0080]: evaluation of constant value failed - --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL + --> $DIR/raw-pointer-ub.rs:19:5 | - = note: accessing memory with alignment 1, but alignment 4 is required +LL | y.copy_to_nonoverlapping(&mut z, 1); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ accessing memory with alignment 1, but alignment 4 is required | -note: inside `copy_nonoverlapping::<u32>` - --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL note: inside `std::ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping` --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL -note: inside `MISALIGNED_COPY` - --> $DIR/raw-pointer-ub.rs:19:5 - | -LL | y.copy_to_nonoverlapping(&mut z, 1); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: inside `copy_nonoverlapping::<u32>` + --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL error[E0080]: evaluation of constant value failed - --> $DIR/raw-pointer-ub.rs:31:16 + --> $DIR/raw-pointer-ub.rs:34:16 | LL | let _val = (*ptr).0; | ^^^^^^^^ accessing memory based on pointer with alignment 4, but alignment 16 is required error[E0080]: evaluation of constant value failed - --> $DIR/raw-pointer-ub.rs:38:16 + --> $DIR/raw-pointer-ub.rs:41:16 | LL | let _val = *ptr; | ^^^^ memory access failed: expected a pointer to 8 bytes of memory, but got ALLOC0 which is only 4 bytes from the end of the allocation |
