File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -884,10 +884,10 @@ pub fn drop<T>(_x: T) {}
884
884
/// Interprets `src` as having type `&U`, and then reads `src` without moving
885
885
/// the contained value.
886
886
///
887
- /// This function will unsafely assume the pointer `src` is valid for
888
- /// [`size_of::<U>`][size_of] bytes by transmuting `&T` to `&U` and then reading
889
- /// the `&U`. It will also unsafely create a copy of the contained value instead of
890
- /// moving out of `src`.
887
+ /// This function will unsafely assume the pointer `src` is valid for [`size_of::<U>`][size_of]
888
+ /// bytes by transmuting `&T` to `&U` and then reading the `&U` (except that this is done in a way
889
+ /// that is correct even when `&U` makes stricter alignment requirements than `&T`). It will also
890
+ /// unsafely create a copy of the contained value instead of moving out of `src`.
891
891
///
892
892
/// It is not a compile-time error if `T` and `U` have different sizes, but it
893
893
/// is highly encouraged to only invoke this function where `T` and `U` have the
You can’t perform that action at this time.
0 commit comments