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 03bd0a2 commit b16f117Copy full SHA for b16f117
clippy_lints/src/casts/mod.rs
@@ -760,8 +760,9 @@ declare_clippy_lint! {
760
/// Checks for casts of small constant literals or `mem::align_of` results to raw pointers.
761
///
762
/// ### 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.
+ /// Creating a pointer through casting from a small constant or alignment value is unsafe
+ /// 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.
766
767
/// ### Example
768
/// ```no_run
0 commit comments