Mention that core::intrinsics::transmute is available at core::mem::transmute.

In #[no_std] environments, std::mem::transmute is unavailable. Searching for transmute in libcore only pulls up core::intrinsics::transmute, which is behind the (unstable) core_intrinsics feature flag. Users wishing to use transmute in #[no_std] environments typically should use core::mem::transmute instead, as it is stable. This documentation makes core::mem::transmute discoverable.
This commit is contained in:
Johnathan Van Why 2019-01-22 15:02:57 -08:00
parent ad30e9a681
commit 0c54d2d12e

View file

@ -729,6 +729,10 @@ extern "rust-intrinsic" {
/// cause [undefined behavior][ub] with this function. `transmute` should be
/// the absolute last resort.
///
/// `transmute` is re-exported by [core::mem](../mem/index.html) as
/// `core::mem::transmute`, which may be used without the `core_intrinsics`
/// feature flag.
///
/// The [nomicon](../../nomicon/transmutes.html) has additional
/// documentation.
///