summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/transmute_ptr_to_ref.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/src/docs/transmute_ptr_to_ref.txt21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/tools/clippy/src/docs/transmute_ptr_to_ref.txt b/src/tools/clippy/src/docs/transmute_ptr_to_ref.txt
deleted file mode 100644
index aca550f50..000000000
--- a/src/tools/clippy/src/docs/transmute_ptr_to_ref.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-### What it does
-Checks for transmutes from a pointer to a reference.
-
-### Why is this bad?
-This can always be rewritten with `&` and `*`.
-
-### Known problems
-- `mem::transmute` in statics and constants is stable from Rust 1.46.0,
-while dereferencing raw pointer is not stable yet.
-If you need to do this in those places,
-you would have to use `transmute` instead.
-
-### Example
-```
-unsafe {
- let _: &T = std::mem::transmute(p); // where p: *const T
-}
-
-// can be written:
-let _: &T = &*p;
-``` \ No newline at end of file