cast_ptr_alignment: Mention legal use under known problems

Refs #2881.
This commit is contained in:
Vinzent Steinberg 2019-07-09 14:48:48 +02:00 committed by GitHub
parent 5f890d44f5
commit f831b0979e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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