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