diff --git a/crates/cust/src/memory/device/device_buffer.rs b/crates/cust/src/memory/device/device_buffer.rs index 3e0ce924..42c8e920 100644 --- a/crates/cust/src/memory/device/device_buffer.rs +++ b/crates/cust/src/memory/device/device_buffer.rs @@ -5,7 +5,7 @@ use crate::memory::{cuda_free_async, DevicePointer}; use crate::memory::{cuda_malloc_async, DeviceCopy}; use crate::stream::Stream; use crate::sys as cuda; -#[cfg_attr(docsrs, doc(cfg(feature = "bytemuck")))] +#[cfg(feature = "bytemuck")] pub use bytemuck; #[cfg(feature = "bytemuck")] use bytemuck::{Pod, PodCastError, Zeroable}; @@ -282,6 +282,7 @@ impl DeviceBuffer { } } +#[cfg(feature = "bytemuck")] fn casting_went_wrong(src: &str, err: PodCastError) -> ! { panic!("{}>{:?}", src, err); }