T
and *T
or &T
RS-E1024Using std::mem::transmute(..)
between a type T
and its *T
or &T
is not guaranteed to work
and is likely undefined behaviour.
That is, transmutes between a type T and *T is a common mistake and can lead to hard-to-track bugs.
fn foo () {
// where the result type is the same as
// `*t` or `&t`'s
core::intrinsics::transmute(t)
}