File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1212,8 +1212,9 @@ extern "rust-intrinsic" {
1212
1212
///
1213
1213
/// `transmute` is semantically equivalent to a bitwise move of one type
1214
1214
/// into another. It copies the bits from the source value into the
1215
- /// destination value, then forgets the original. It's equivalent to C's
1216
- /// `memcpy` under the hood, just like `transmute_copy`.
1215
+ /// destination value, then forgets the original. Note that source and destination
1216
+ /// are passed by-value, which means if `T` or `U` contains padding, that padding
1217
+ /// might *not* be preserved by `transmute`.
1217
1218
///
1218
1219
/// Because `transmute` is a by-value operation, alignment of the *transmuted values
1219
1220
/// themselves* is not a concern. As with any other function, the compiler already ensures
You can’t perform that action at this time.
0 commit comments