We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ea7cd1 commit 0bcfae9Copy full SHA for 0bcfae9
clippy_lints/src/types.rs
@@ -974,15 +974,16 @@ declare_clippy_lint! {
974
/// behavior.
975
///
976
/// **Known problems:** Using `std::ptr::read_unaligned` and `std::ptr::write_unaligned` or similar
977
- /// on the resulting pointer is fine.
+ /// on the resulting pointer is fine. Is over-zealous: Casts with manual alignment checks or casts like
978
+ /// u64-> u8 -> u16 can be fine. Miri is able to do a more in-depth analysis.
979
980
/// **Example:**
981
/// ```rust
982
/// let _ = (&1u8 as *const u8) as *const u16;
983
/// let _ = (&mut 1u8 as *mut u8) as *mut u16;
984
/// ```
985
pub CAST_PTR_ALIGNMENT,
- correctness,
986
+ pedantic,
987
"cast from a pointer to a more-strictly-aligned pointer"
988
}
989
0 commit comments