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
LL | memcpy(&mut ptr2 as *mut _ as *mut _, &ptr as *const _ as *const _, mem::size_of::<&i32>() / 2);
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `MEMCPY_RET` failed inside this call
6
6
|
7
-
= note: while pointers can be broken apart into individual bytes during const-evaluation, only complete pointers (with all their bytes in the right order) are supported in the final value
7
+
= help: this code performed an operation that depends on the underlying bytes representing a pointer
8
+
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
9
+
note: inside `memcpy`
10
+
--> $DIR/ptr_fragments_in_final.rs:10:26
11
+
|
12
+
LL | dst.add(i).write(src.add(i).read());
13
+
| ^^^^^^^^^^^^^^^^^ the failure occurred here
8
14
9
15
error: aborting due to 1 previous error
10
16
17
+
For more information about this error, try `rustc --explain E0080`.
0 commit comments