Skip to content

Commit e822648

Browse files
committed
Add a known problem for transmute_ptr_to_ref lint
1 parent 0b77c35 commit e822648

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clippy_lints/src/transmute.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ declare_clippy_lint! {
9898
///
9999
/// **Why is this bad?** This can always be rewritten with `&` and `*`.
100100
///
101-
/// **Known problems:** None.
101+
/// **Known problems:**
102+
/// - `mem::transmute` in statics and constants is stable from Rust 1.46.0,
103+
/// while dereferencing raw pointer is not stable yet.
104+
/// If you need to do this in those places,
105+
/// you would have to use `transmute` instead.
102106
///
103107
/// **Example:**
104108
/// ```rust,ignore

0 commit comments

Comments
 (0)