2023-09-04 09:32:23 +02:00
|
|
|
error[E0080]: evaluation of constant value failed
|
2022-09-04 21:13:44 +04:00
|
|
|
--> $DIR/raw-pointer-ub.rs:7:16
|
2023-09-04 09:32:23 +02:00
|
|
|
|
|
|
|
|
LL | let _val = *ptr;
|
2023-09-26 16:25:05 +02:00
|
|
|
| ^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required
|
2023-09-04 09:32:23 +02:00
|
|
|
|
|
|
|
error[E0080]: evaluation of constant value failed
|
2022-09-04 21:13:44 +04:00
|
|
|
--> $DIR/raw-pointer-ub.rs:14:5
|
2023-09-04 09:32:23 +02:00
|
|
|
|
|
|
|
|
LL | *ptr = 0;
|
2023-09-26 16:25:05 +02:00
|
|
|
| ^^^^^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required
|
2023-09-04 09:32:23 +02:00
|
|
|
|
|
|
|
error[E0080]: evaluation of constant value failed
|
|
|
|
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
|
|
|
|
|
|
|
|
= note: accessing memory with alignment 1, but alignment 4 is required
|
|
|
|
|
|
|
|
|
note: inside `copy_nonoverlapping::<u32>`
|
|
|
|
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
2023-11-19 19:04:06 -05:00
|
|
|
note: inside `std::ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
|
2023-09-04 09:32:23 +02:00
|
|
|
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
|
|
|
note: inside `MISALIGNED_COPY`
|
2022-09-04 21:13:44 +04:00
|
|
|
--> $DIR/raw-pointer-ub.rs:22:5
|
2023-09-04 09:32:23 +02:00
|
|
|
|
|
|
|
|
LL | y.copy_to_nonoverlapping(&mut z, 1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0080]: evaluation of constant value failed
|
2022-09-04 21:13:44 +04:00
|
|
|
--> $DIR/raw-pointer-ub.rs:34:16
|
2023-09-05 15:12:18 +02:00
|
|
|
|
|
|
|
|
LL | let _val = (*ptr).0;
|
2023-09-26 16:25:05 +02:00
|
|
|
| ^^^^^^^^ accessing memory based on pointer with alignment 4, but alignment 16 is required
|
2023-09-05 15:12:18 +02:00
|
|
|
|
|
|
|
error[E0080]: evaluation of constant value failed
|
2022-09-04 21:13:44 +04:00
|
|
|
--> $DIR/raw-pointer-ub.rs:41:16
|
2023-09-04 09:32:23 +02:00
|
|
|
|
|
|
|
|
LL | let _val = *ptr;
|
2023-10-15 17:00:11 +00:00
|
|
|
| ^^^^ memory access failed: ALLOC0 has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
2023-09-04 09:32:23 +02:00
|
|
|
|
2023-09-05 15:12:18 +02:00
|
|
|
error: aborting due to 5 previous errors
|
2023-09-04 09:32:23 +02:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0080`.
|