# `::maybe-dangling`
`ManuallyDrop<T>` and `MaybeDangling<T>` semantics in stable Rust as per <https://github.com/rust-lang/rfcs/pull/3336>
[](
https://github.com/danielhenrymantilla/maybe-dangling.rs)
[](
https://crates.io/crates/maybe-dangling)
[](
https://docs.rs/maybe-dangling)
[](
https://gist.github.com/danielhenrymantilla/9b59de4db8e5f2467ed008b3c450527b)
[](
https://github.com/danielhenrymantilla/maybe-dangling.rs/blob/master/LICENSE-ZLIB)
[](
https://github.com/danielhenrymantilla/maybe-dangling.rs/actions)
[](
https://github.com/rust-secure-code/safety-dance/)
This crates offers two types, `ManuallyDrop<T>`, and `MaybeDangling<T>`, which do not carry
[aliasing/`dereferenceable`-ity properties](https://github.com/rust-lang/rfcs/pull/3336) w.r.t. the
`T` they each contain, which means they are allowed to:
1. have some expired value inside of them, such as `T = &'expired …`,
1. be fed to a function that does not inspect its value (such as `::core::mem::forget()`),
1. 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 `miri` PR implementing the check against this: <https://github.com/rust-lang/miri/pull/2985>
- The soundness problem of `::ouroboros` stemming from not using this: <https://github.com/joshua-maros/ouroboros/issues/88>
- The soundness problem of `::yoke` stemming 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](https://users.rust-lang.org/t/unsafe-code-review-semi-owning-weak-rwlock-t-guard/95706/15?u=yandros)