SafeManuallyDrop 1.0.3

A safe version of ManuallyDrop with various features and options to track undefined behavior when working with ManuallyDrop.
Documentation

Build #3383028 2026-05-25 17:37:16

# rustc version rustc 1.98.0-nightly (423e3d252 2026-05-24)

# docs.rs version docsrs 0.0.0 (f16e33f3e6ac9fc9e4413728c5dd1b2ba1c6b799 2026-05-23 )

# build log [INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-w" "/opt/rustwide/workdir" "--user" "1001:1001" "1f690513aa1b2a427787710ca866c7378cb68624095693dfba3cc38d68ae7a11" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--all-features" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20260524-1.98.0-nightly-423e3d252\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }` [INFO] [stderr] warning: use of deprecated method `std::cmp::Eq::assert_receiver_is_total_eq`: implementation detail of `#[derive(Eq)]` [INFO] [stderr] --> src/macro_codegen.rs:684:9 [INFO] [stderr] | [INFO] [stderr] 684 | Eq::assert_receiver_is_total_eq(value) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] ::: src/beh/unsafe.rs:15:1 [INFO] [stderr] | [INFO] [stderr] 15 | / crate::__codegen! { [INFO] [stderr] 16 | | @use; [INFO] [stderr] 17 | | @impl UnsafeManuallyDrop { [INFO] [stderr] 18 | | is_safe: false, [INFO] [stderr] ... | [INFO] [stderr] 51 | | } [INFO] [stderr] | |_- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(deprecated)]` on by default [INFO] [stderr] = note: this warning originates in the macro `$crate::__codegen` which comes from the expansion of the macro `crate::__codegen` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: use of deprecated method `std::cmp::Eq::assert_receiver_is_total_eq`: implementation detail of `#[derive(Eq)]` [INFO] [stderr] --> src/macro_codegen.rs:684:9 [INFO] [stderr] | [INFO] [stderr] 684 | Eq::assert_receiver_is_total_eq(value) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] ::: src/beh/safe.rs:17:1 [INFO] [stderr] | [INFO] [stderr] 17 | / crate::__codegen! { [INFO] [stderr] 18 | | @use; [INFO] [stderr] 19 | | @impl SafeManuallyDrop { [INFO] [stderr] 20 | | is_safe: true, [INFO] [stderr] ... | [INFO] [stderr] 54 | | } [INFO] [stderr] | |_- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: this warning originates in the macro `$crate::__codegen` which comes from the expansion of the macro `crate::__codegen` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: `Eq::assert_receiver_is_total_eq` should never be implemented by hand [INFO] [stderr] --> src/macro_codegen.rs:682:4 [INFO] [stderr] | [INFO] [stderr] 682 | / fn assert_receiver_is_total_eq(&self) { [INFO] [stderr] 683 | | let value: &T = self.deref(); [INFO] [stderr] 684 | | Eq::assert_receiver_is_total_eq(value) [INFO] [stderr] 685 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] ::: src/beh/unsafe.rs:15:1 [INFO] [stderr] | [INFO] [stderr] 15 | / crate::__codegen! { [INFO] [stderr] 16 | | @use; [INFO] [stderr] 17 | | @impl UnsafeManuallyDrop { [INFO] [stderr] 18 | | is_safe: false, [INFO] [stderr] ... | [INFO] [stderr] 51 | | } [INFO] [stderr] | |_- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: this method was used to add checks to the `Eq` derive macro [INFO] [stderr] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! [INFO] [stderr] = note: for more information, see issue #152336 <https://github.com/rust-lang/rust/issues/152336> [INFO] [stderr] = note: `#[warn(internal_eq_trait_method_impls)]` (part of `#[warn(future_incompatible)]`) on by default [INFO] [stderr] = note: this warning originates in the macro `$crate::__codegen` which comes from the expansion of the macro `crate::__codegen` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: `Eq::assert_receiver_is_total_eq` should never be implemented by hand [INFO] [stderr] --> src/macro_codegen.rs:682:4 [INFO] [stderr] | [INFO] [stderr] 682 | / fn assert_receiver_is_total_eq(&self) { [INFO] [stderr] 683 | | let value: &T = self.deref(); [INFO] [stderr] 684 | | Eq::assert_receiver_is_total_eq(value) [INFO] [stderr] 685 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] ::: src/beh/safe.rs:17:1 [INFO] [stderr] | [INFO] [stderr] 17 | / crate::__codegen! { [INFO] [stderr] 18 | | @use; [INFO] [stderr] 19 | | @impl SafeManuallyDrop { [INFO] [stderr] 20 | | is_safe: true, [INFO] [stderr] ... | [INFO] [stderr] 54 | | } [INFO] [stderr] | |_- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: this method was used to add checks to the `Eq` derive macro [INFO] [stderr] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! [INFO] [stderr] = note: for more information, see issue #152336 <https://github.com/rust-lang/rust/issues/152336> [INFO] [stderr] = note: this warning originates in the macro `$crate::__codegen` which comes from the expansion of the macro `crate::__codegen` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: `SafeManuallyDrop` (lib) generated 4 warnings [INFO] [stderr] Scraping SafeManuallyDrop v1.0.3 (/opt/rustwide/workdir) [INFO] [stderr] Documenting SafeManuallyDrop v1.0.3 (/opt/rustwide/workdir) [INFO] [stderr] warning: unclosed HTML tag `T` [INFO] [stderr] --> src/macro_codegen.rs:254:47 [INFO] [stderr] | [INFO] [stderr] 254 | /// Takes the value from the ManuallyDrop<T> container out. [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] ::: src/beh/unsafe.rs:15:1 [INFO] [stderr] | [INFO] [stderr] 15 | / crate::__codegen! { [INFO] [stderr] 16 | | @use; [INFO] [stderr] 17 | | @impl UnsafeManuallyDrop { [INFO] [stderr] 18 | | is_safe: false, [INFO] [stderr] ... | [INFO] [stderr] 51 | | } [INFO] [stderr] | |_- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(rustdoc::invalid_html_tags)]` on by default [INFO] [stderr] = note: this warning originates in the macro `$crate::__codegen` which comes from the expansion of the macro `crate::__codegen` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] help: try marking as source code [INFO] [stderr] | [INFO] [stderr] 254 | /// Takes the value from the `ManuallyDrop<T>` container out. [INFO] [stderr] | + + [INFO] [stderr] [INFO] [stderr] warning: unclosed HTML tag `T` [INFO] [stderr] --> src/macro_codegen.rs:254:47 [INFO] [stderr] | [INFO] [stderr] 254 | /// Takes the value from the ManuallyDrop<T> container out. [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] ::: src/beh/safe.rs:17:1 [INFO] [stderr] | [INFO] [stderr] 17 | / crate::__codegen! { [INFO] [stderr] 18 | | @use; [INFO] [stderr] 19 | | @impl SafeManuallyDrop { [INFO] [stderr] 20 | | is_safe: true, [INFO] [stderr] ... | [INFO] [stderr] 54 | | } [INFO] [stderr] | |_- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: this warning originates in the macro `$crate::__codegen` which comes from the expansion of the macro `crate::__codegen` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] help: try marking as source code [INFO] [stderr] | [INFO] [stderr] 254 | /// Takes the value from the `ManuallyDrop<T>` container out. [INFO] [stderr] | + + [INFO] [stderr] [INFO] [stderr] warning: `SafeManuallyDrop` (lib doc) generated 2 warnings [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.91s [INFO] [stderr] Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/SafeManuallyDrop/index.html [INFO] running `Command { std: "docker" "inspect" "1f690513aa1b2a427787710ca866c7378cb68624095693dfba3cc38d68ae7a11", kill_on_drop: false }`