]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/wrong_transmute.txt
Auto merge of #104673 - matthiaskrgr:rollup-85f65ov, r=matthiaskrgr
[rust.git] / src / tools / clippy / src / docs / wrong_transmute.txt
1 ### What it does
2 Checks for transmutes that can't ever be correct on any
3 architecture.
4
5 ### Why is this bad?
6 It's basically guaranteed to be undefined behavior.
7
8 ### Known problems
9 When accessing C, users might want to store pointer
10 sized objects in `extradata` arguments to save an allocation.
11
12 ### Example
13 ```
14 let ptr: *const T = core::intrinsics::transmute('x')
15 ```