summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/wrong_transmute.txt
blob: 9fc71e0e382e3410834cba1cab328de604f4cf7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### What it does
Checks for transmutes that can't ever be correct on any
architecture.

### Why is this bad?
It's basically guaranteed to be undefined behavior.

### Known problems
When accessing C, users might want to store pointer
sized objects in `extradata` arguments to save an allocation.

### Example
```
let ptr: *const T = core::intrinsics::transmute('x')
```