]> git.lizzy.rs Git - rust.git/blob - src/docs/useless_transmute.txt
Auto merge of #9421 - xphoniex:fix-#9420, r=giraffate
[rust.git] / src / docs / useless_transmute.txt
1 ### What it does
2 Checks for transmutes to the original type of the object
3 and transmutes that could be a cast.
4
5 ### Why is this bad?
6 Readability. The code tricks people into thinking that
7 something complex is going on.
8
9 ### Example
10 ```
11 core::intrinsics::transmute(t); // where the result type is the same as `t`'s
12 ```