]> git.lizzy.rs Git - rust.git/commitdiff
Add a known problem for transmute_ptr_to_ref lint
authorXidorn Quan <me@upsuper.org>
Wed, 14 Oct 2020 12:15:01 +0000 (23:15 +1100)
committerXidorn Quan <me@upsuper.org>
Wed, 14 Oct 2020 12:15:01 +0000 (23:15 +1100)
clippy_lints/src/transmute.rs

index c75adb62f2575aedab44e40b1b8163b0522a8f84..47c650ac27d4c08cc594347789d2a8962de706bb 100644 (file)
     ///
     /// **Why is this bad?** This can always be rewritten with `&` and `*`.
     ///
-    /// **Known problems:** None.
+    /// **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:**
     /// ```rust,ignore