RS.CLIPPY.USELESS_TRANSMUTE
Transmutes that have the same to and from types or could be a cast/coercion
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: useless_transmute. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for transmutes to the original type of the object and transmutes that could be a cast.
Why is this bad?
Readability. The code tricks people into thinking that something complex is going on.
Example
core::intrinsics::transmute(t); // where the result type is the same as `t`\'s