mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-25 08:12:26 +00:00
Closes https://github.com/Lokathor/bytemuck/issues/224, the Nightly feature name changed.
This commit is contained in:
parent
5f93477418
commit
678c923f52
10
src/lib.rs
10
src/lib.rs
@ -4,7 +4,7 @@
|
|||||||
#![allow(clippy::uninlined_format_args)]
|
#![allow(clippy::uninlined_format_args)]
|
||||||
#![cfg_attr(feature = "nightly_docs", feature(doc_cfg))]
|
#![cfg_attr(feature = "nightly_docs", feature(doc_cfg))]
|
||||||
#![cfg_attr(feature = "nightly_portable_simd", feature(portable_simd))]
|
#![cfg_attr(feature = "nightly_portable_simd", feature(portable_simd))]
|
||||||
#![cfg_attr(feature = "nightly_stdsimd", feature(stdsimd))]
|
#![cfg_attr(feature = "nightly_stdsimd", feature(stdarch_x86_avx512))]
|
||||||
|
|
||||||
//! This crate gives small utilities for casting between plain data types.
|
//! This crate gives small utilities for casting between plain data types.
|
||||||
//!
|
//!
|
||||||
@ -252,8 +252,8 @@ pub fn from_bytes_mut<T: NoUninit + AnyBitPattern>(s: &mut [u8]) -> &mut T {
|
|||||||
|
|
||||||
/// Reads from the bytes as if they were a `T`.
|
/// Reads from the bytes as if they were a `T`.
|
||||||
///
|
///
|
||||||
/// Unlike [`from_bytes`], the slice doesn't need to respect alignment of `T`, only sizes
|
/// Unlike [`from_bytes`], the slice doesn't need to respect alignment of `T`,
|
||||||
/// must match.
|
/// only sizes must match.
|
||||||
///
|
///
|
||||||
/// ## Failure
|
/// ## Failure
|
||||||
/// * If the `bytes` length is not equal to `size_of::<T>()`.
|
/// * If the `bytes` length is not equal to `size_of::<T>()`.
|
||||||
@ -266,8 +266,8 @@ pub fn try_pod_read_unaligned<T: AnyBitPattern>(
|
|||||||
|
|
||||||
/// Reads the slice into a `T` value.
|
/// Reads the slice into a `T` value.
|
||||||
///
|
///
|
||||||
/// Unlike [`from_bytes`], the slice doesn't need to respect alignment of `T`, only sizes
|
/// Unlike [`from_bytes`], the slice doesn't need to respect alignment of `T`,
|
||||||
/// must match.
|
/// only sizes must match.
|
||||||
///
|
///
|
||||||
/// ## Panics
|
/// ## 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.
|
||||||
|
Loading…
Reference in New Issue
Block a user