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:
parent
ad30e9a681
commit
0c54d2d12e
1 changed files with 4 additions and 0 deletions
|
|
@ -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.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue