Skip to main content

maybe_dangling/
manually_drop.rs

1::core::cfg_select! {
2    not(feature = "acknowledge-unnecessary-manually-drop") => {
3        /// Ever since Rust 1.96.0, and this library's version `0.1.3…`, [`ManuallyDrop`] is a mere
4        /// re-export of [`::core::mem::ManuallyDrop`], as the latter has started featuring the desired
5        /// [`crate::MaybeDangling`] semantics inside of it.
6        ///
7        /// See, for instance, <https://github.com/rust-lang/rust/pull/155750>.
8        ///
9        /// ### Deprecated
10        ///
11        /// As a nudging feature, usage of this type is marked deprecated unless you acknowledge
12        /// this change by enabling the `"acknowledge-unnecessary-manually-drop"` Cargo feature.
13        ///
14        /// This is something you may wish to do if you intend to support Rust across old and newer
15        /// MSRVs (although it is rather advisable to `#[allow(deprecated)]` usages of it).
16        #[deprecated(
17            since = "0.1.3",
18            note = "you do not need to use this type anymore, \
19                as you can directly use the one from the stdlib."
20        )]
21        pub type ManuallyDrop<T> = ::core::mem::ManuallyDrop<T>;
22    },
23
24    _ => {
25        #[doc(no_inline)]
26        pub use ::core::mem::ManuallyDrop;
27    },
28}