mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 17:28:07 +00:00
moved cast_ptr_alignment to pedantic and expanded documentation
This commit is contained in:
parent
7ea7cd165a
commit
0bcfae92f8
1 changed files with 3 additions and 2 deletions
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue