Skip to content

Commit 0d6cd23

Browse files
kjetilkjekaKjetil
and
Kjetil
authored
Fix: cust compilation errors with no-default-features (#50)
Co-authored-by: Kjetil <[email protected]>
1 parent 8a32ee7 commit 0d6cd23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/cust/src/memory/device/device_buffer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::memory::{cuda_free_async, DevicePointer};
55
use crate::memory::{cuda_malloc_async, DeviceCopy};
66
use crate::stream::Stream;
77
use crate::sys as cuda;
8-
#[cfg_attr(docsrs, doc(cfg(feature = "bytemuck")))]
8+
#[cfg(feature = "bytemuck")]
99
pub use bytemuck;
1010
#[cfg(feature = "bytemuck")]
1111
use bytemuck::{Pod, PodCastError, Zeroable};
@@ -282,6 +282,7 @@ impl<T: DeviceCopy + Zeroable> DeviceBuffer<T> {
282282
}
283283
}
284284

285+
#[cfg(feature = "bytemuck")]
285286
fn casting_went_wrong(src: &str, err: PodCastError) -> ! {
286287
panic!("{}>{:?}", src, err);
287288
}

0 commit comments

Comments
 (0)