File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -974,15 +974,16 @@ declare_clippy_lint! {
974
974
/// behavior.
975
975
///
976
976
/// **Known problems:** Using `std::ptr::read_unaligned` and `std::ptr::write_unaligned` or similar
977
- /// on the resulting pointer is fine.
977
+ /// 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.
978
979
///
979
980
/// **Example:**
980
981
/// ```rust
981
982
/// let _ = (&1u8 as *const u8) as *const u16;
982
983
/// let _ = (&mut 1u8 as *mut u8) as *mut u16;
983
984
/// ```
984
985
pub CAST_PTR_ALIGNMENT ,
985
- correctness ,
986
+ pedantic ,
986
987
"cast from a pointer to a more-strictly-aligned pointer"
987
988
}
988
989
You can’t perform that action at this time.
0 commit comments