Skip to content

Commit

Permalink
Cargo.toml: add transparentwrapper_extra to latest_stable_rust, and e…
Browse files Browse the repository at this point in the history
…xpand on comment for alloc_uninit. (#289)

src/checked.rs: Add doc-link.
  • Loading branch information
zachs18 authored Dec 17, 2024
1 parent 9801bb9 commit d6c589f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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 = []
Expand All @@ -73,6 +74,7 @@ latest_stable_rust = [
"must_cast",
"must_cast_extra",
"track_caller",
"transparentwrapper_extra",
"wasm_simd",
"zeroable_atomics",
"zeroable_maybe_uninit",
Expand Down
2 changes: 1 addition & 1 deletion src/checked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ pub fn from_bytes_mut<T: NoUninit + CheckedBitPattern>(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<T: CheckedBitPattern>(bytes: &[u8]) -> T {
Expand Down

0 comments on commit d6c589f

Please sign in to comment.