You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rust-lang/rust#45527 gives us std::ptr::dangling which allows replacing 1 as _ with std::ptr::dangling(). Once that is stable, it should be a warn lint. Until then an allow lint is ok.
Should probably live together with the zero_ptr lint
The text was updated successfully, but these errors were encountered:
Is anyone still interested in implementing this? Even if there is no fix that Clippy can propose, just giving the user the ability to track down such casts is already useful. Note that such casts create a pointer with no provenance, which can be particularly objectionable for future development of Rust code.
rust-lang/rust#45527 gives us
std::ptr::dangling
which allows replacing1 as _
withstd::ptr::dangling()
. Once that is stable, it should be a warn lint. Until then an allow lint is ok.Should probably live together with the zero_ptr lint
The text was updated successfully, but these errors were encountered: