about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-09 13:15:29 +0000
committerbors <bors@rust-lang.org>2019-07-09 13:15:29 +0000
commitf0d217026ab511c88c4d8fb97d2a5dae50da8800 (patch)
tree069c765130615cb88bbf8f1c33a0fcc4cb80517e
parent5f890d44f50617fd00a2cbcaa5d2b241cbd494cb (diff)
parentf831b0979e6a694c499c37570252fe787e04123c (diff)
downloadrust-f0d217026ab511c88c4d8fb97d2a5dae50da8800.tar.gz
rust-f0d217026ab511c88c4d8fb97d2a5dae50da8800.zip
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
-rw-r--r--clippy_lints/src/types.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs
index b674b3888ab..7b1d832f249 100644
--- a/clippy_lints/src/types.rs
+++ b/clippy_lints/src/types.rs
@@ -789,7 +789,8 @@ declare_clippy_lint! {
     /// **Why is this bad?** Dereferencing the resulting pointer may be undefined
     /// behavior.
     ///
-    /// **Known problems:** None.
+    /// **Known problems:** Using `std::ptr::read_unaligned` and `std::ptr::write_unaligned` or similar
+    /// on the resulting pointer is fine.
     ///
     /// **Example:**
     /// ```rust