From bc5f3e0e01a5f2d067ff4292d5a10093ae680f53 Mon Sep 17 00:00:00 2001 From: Christian Schrefl Date: Mon, 21 Apr 2025 22:18:13 +0000 Subject: [PATCH] rust: pin-init: Update Changelog and Readme Add Changelog entry for the `Wrapper` trait and document the `unsafe-pinned` feature in the Readme. Signed-off-by: Christian Schrefl Link: https://github.com/Rust-for-Linux/pin-init/pull/37/commits/986555f564645efb238e8092c6314388c859efe5 [ Fixed commit authorship. - Benno ] Signed-off-by: Benno Lossin --- rust/pin-init/README.md | 6 ++++++ rust/pin-init/src/lib.rs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/rust/pin-init/README.md b/rust/pin-init/README.md index 24d0f0a3f8fb..1a03b200d4ce 100644 --- a/rust/pin-init/README.md +++ b/rust/pin-init/README.md @@ -40,6 +40,12 @@ However, using the crate on stable compilers is possible by disabling `alloc`. I will require the `std` feature, because stable compilers have neither `Box` nor `Arc` in no-std mode. +### Nightly needed for `unsafe-pinned` feature + +This feature enables the `Wrapper` implementation on the unstable `core::pin::UnsafePinned` type. +This requires the [`unsafe_pinned` unstable feature](https://github.com/rust-lang/rust/issues/125735) +and therefore a nightly compiler. Note that this feature is not enabled by default. + ## Overview To initialize a `struct` with an in-place constructor you will need two things: diff --git a/rust/pin-init/src/lib.rs b/rust/pin-init/src/lib.rs index 745cf534d239..1521500a46b1 100644 --- a/rust/pin-init/src/lib.rs +++ b/rust/pin-init/src/lib.rs @@ -32,6 +32,12 @@ //! will require the `std` feature, because stable compilers have neither `Box` nor `Arc` in no-std //! mode. //! +//! ## Nightly needed for `unsafe-pinned` feature +//! +//! This feature enables the `Wrapper` implementation on the unstable `core::pin::UnsafePinned` type. +//! This requires the [`unsafe_pinned` unstable feature](https://github.com/rust-lang/rust/issues/125735) +//! and therefore a nightly compiler. Note that this feature is not enabled by default. +//! //! # Overview //! //! To initialize a `struct` with an in-place constructor you will need two things: -- 2.25.1