Skip to content

Commit b16f117

Browse files
committed
update lint description
1 parent 03bd0a2 commit b16f117

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clippy_lints/src/casts/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,9 @@ declare_clippy_lint! {
760760
/// Checks for casts of small constant literals or `mem::align_of` results to raw pointers.
761761
///
762762
/// ### Why is this bad?
763-
/// Creating a pointer through casting from a small constant or alignment value is unsafe and can lead
764-
/// to undefined behavior since it creates an invalid dangling pointer.
763+
/// Creating a pointer through casting from a small constant or alignment value is unsafe
764+
/// and can lead to undefined behavior since it creates an invalid dangling pointer.
765+
/// If this is intended, use `std::ptr::dangling` or `std::ptr::dangling_mut` instead.
765766
///
766767
/// ### Example
767768
/// ```no_run

0 commit comments

Comments
 (0)