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" {
12121212 ///
12131213 /// `transmute` is semantically equivalent to a bitwise move of one type
12141214 /// 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`.
12171218 ///
12181219 /// Because `transmute` is a by-value operation, alignment of the *transmuted values
12191220 /// 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