From 0570340c7b5de1df0675306b49526644dbf046a3 Mon Sep 17 00:00:00 2001 From: Zachary S Date: Fri, 6 Dec 2024 22:18:05 -0600 Subject: [PATCH] Cargo.toml: add transparentwrapper_extra to latest_stable_rust, and expand on comment for alloc_uninit. src/checked.rs: Add doc-link. --- Cargo.toml | 4 +++- src/checked.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4e6c92a..23c10d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,8 @@ transparentwrapper_extra = [] const_zeroed = [] # MSRV 1.75.0: support const `zeroed()` -alloc_uninit = [] # MSRV 1.82.0: support `zeroed_*rc*` +# MSRV 1.82.0: support `zeroed_*rc*` when combined with `extern_crate_alloc` +alloc_uninit = [] # Do not use if you can avoid it, because this is **unsound**!!!! unsound_ptr_pod_impl = [] @@ -69,6 +70,7 @@ latest_stable_rust = [ "min_const_generics", "must_cast", "track_caller", + "transparentwrapper_extra", "wasm_simd", "zeroable_atomics", "zeroable_maybe_uninit", diff --git a/src/checked.rs b/src/checked.rs index 05e0137..5e89133 100644 --- a/src/checked.rs +++ b/src/checked.rs @@ -438,7 +438,7 @@ pub fn from_bytes_mut(s: &mut [u8]) -> &mut T { /// Reads the slice into a `T` value. /// /// ## Panics -/// * This is like `try_pod_read_unaligned` but will panic on failure. +/// * This is like [`try_pod_read_unaligned`] but will panic on failure. #[inline] #[cfg_attr(feature = "track_caller", track_caller)] pub fn pod_read_unaligned(bytes: &[u8]) -> T {