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
This commit is contained in:
bors 2019-07-09 13:15:29 +00:00
commit f0d217026a

View File

@ -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