Skip to content

Commit f0d2170

Browse files
committed
Auto merge of #4265 - vks:patch-1, r=flip1995
cast_ptr_alignment: Mention legal use under known problems Refs #2881. changelog: Mention know problems for cast_ptr_alignment
2 parents 5f890d4 + f831b09 commit f0d2170

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/types.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,8 @@ declare_clippy_lint! {
789789
/// **Why is this bad?** Dereferencing the resulting pointer may be undefined
790790
/// behavior.
791791
///
792-
/// **Known problems:** None.
792+
/// **Known problems:** Using `std::ptr::read_unaligned` and `std::ptr::write_unaligned` or similar
793+
/// on the resulting pointer is fine.
793794
///
794795
/// **Example:**
795796
/// ```rust

0 commit comments

Comments
 (0)