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
Copy file name to clipboardexpand all lines: compiler/rustc_mir_transform/messages.ftl
+5
Original file line number
Diff line number
Diff line change
@@ -27,3 +27,8 @@ mir_transform_unaligned_packed_ref = reference to packed field is unaligned
27
27
.note = packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
28
28
.note_ub = creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
29
29
.help = copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
30
+
31
+
mir_transform_undefined_transmute = pointers cannot be transmuted to integers during const eval
32
+
.note = at compile-time, pointers do not have an integer value
33
+
.note2 = avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
34
+
.help = for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html
0 commit comments