maybe-dangling

Crates.iomaybe-dangling
lib.rsmaybe-dangling
version0.1.1
sourcesrc
created_at2023-06-20 10:55:21.995114
updated_at2023-12-10 10:12:50.43262
description`ManuallyDrop` and `MaybeDangling` semantics in stable Rust as per https://github.com/rust-lang/rfcs/pull/3336
homepage
repositoryhttps://github.com/danielhenrymantilla/maybe-dangling.rs
max_upload_size
id894969
size48,302
Alice Ryhl (Darksonn)

documentation

https://docs.rs/maybe-dangling

README

::maybe-dangling

ManuallyDrop<T> and MaybeDangling<T> semantics in stable Rust as per https://github.com/rust-lang/rfcs/pull/3336

Repository Latest version Documentation MSRV License CI no_std compatible

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:

  1. have some expired value inside of them, such as T = &'expired …,
  2. be fed to a function that does not inspect its value (such as ::core::mem::forget()),
  3. exhibit well-defined behavior (no UB!).

References

Commit count: 22

cargo fmt