8 releases
| 0.1.2 | Oct 18, 2025 |
|---|---|
| 0.1.1 | Dec 10, 2023 |
| 0.1.1-rc1 | Dec 6, 2023 |
| 0.1.0 | Jul 20, 2023 |
| 0.0.0 | Jun 20, 2023 |
#493 in Development tools
3,255 downloads per month
Used in 8 crates
(5 directly)
32KB
310 lines
::maybe-dangling
ManuallyDrop<T> and MaybeDangling<T> semantics in stable Rust as per https://github.com/rust-lang/rfcs/pull/3336
This crates offers two types, ManuallyDrop<T>, and MaybeDangling<T>, which do not carry
aliasing/dereferenceable-ity properties w.r.t. the
T they each contain, which means they are allowed to:
- have some expired value inside of them, such as
T = &'expired …, - be fed to a function that does not inspect its value (such as
::core::mem::forget()), - exhibit well-defined behavior (no UB!).
References
-
The RFC that shall eventually and ultimately supersede this very crate: https://github.com/rust-lang/rfcs/pull/3336
-
The
miriPR implementing the check against this: https://github.com/rust-lang/miri/pull/2985 -
The soundness problem of
::ouroborosstemming from not using this: https://github.com/joshua-maros/ouroboros/issues/88 -
The soundness problem of
::yokestemming from not using this: https://github.com/unicode-org/icu4x/issues/3696 -
An URLO thread on the topic, and a post exposing the intention to write this very crate