about summary refs log tree commit diff
diff options
context:
space:
mode:
authordjugei <ddjugei@gmail.com>2020-05-31 15:41:33 +0200
committerdjugei <ddjugei@gmail.com>2020-05-31 15:41:33 +0200
commit0bcfae92f80d31cad4e5fb687da8033a38d06a32 (patch)
tree72b7881e739a8ad3ff48b4cccce8a38f60517193
parent7ea7cd165ad6705603852771bf82cc2fd6560db5 (diff)
downloadrust-0bcfae92f80d31cad4e5fb687da8033a38d06a32.tar.gz
rust-0bcfae92f80d31cad4e5fb687da8033a38d06a32.zip
moved cast_ptr_alignment to pedantic and expanded documentation
-rw-r--r--clippy_lints/src/types.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs
index 6ed9ff22e46..3ac99e24684 100644
--- a/clippy_lints/src/types.rs
+++ b/clippy_lints/src/types.rs
@@ -974,7 +974,8 @@ declare_clippy_lint! {
     /// behavior.
     ///
     /// **Known problems:** Using `std::ptr::read_unaligned` and `std::ptr::write_unaligned` or similar
-    /// on the resulting pointer is fine.
+    /// on the resulting pointer is fine. Is over-zealous: Casts with manual alignment checks or casts like
+    /// u64-> u8 -> u16 can be fine. Miri is able to do a more in-depth analysis.
     ///
     /// **Example:**
     /// ```rust
@@ -982,7 +983,7 @@ declare_clippy_lint! {
     /// let _ = (&mut 1u8 as *mut u8) as *mut u16;
     /// ```
     pub CAST_PTR_ALIGNMENT,
-    correctness,
+    pedantic,
     "cast from a pointer to a more-strictly-aligned pointer"
 }