diff options
Diffstat (limited to 'src/tools/clippy/src/docs/crosspointer_transmute.txt')
-rw-r--r-- | src/tools/clippy/src/docs/crosspointer_transmute.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/crosspointer_transmute.txt b/src/tools/clippy/src/docs/crosspointer_transmute.txt new file mode 100644 index 000000000..49dea1549 --- /dev/null +++ b/src/tools/clippy/src/docs/crosspointer_transmute.txt @@ -0,0 +1,12 @@ +### What it does +Checks for transmutes between a type `T` and `*T`. + +### Why is this bad? +It's easy to mistakenly transmute between a type and a +pointer to that type. + +### Example +``` +core::intrinsics::transmute(t) // where the result type is the same as + // `*t` or `&t`'s +```
\ No newline at end of file |