Skip to content

Commit 668b33b

Browse files
committed
Feat: implement DeviceCopy for pointers
1 parent 8cafeb3 commit 668b33b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/cust_core/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ pub mod _hidden {
8888

8989
NonZeroU8 NonZeroU16 NonZeroU32 NonZeroU64 NonZeroU128
9090
);
91+
unsafe impl<T> DeviceCopy for *const T {}
92+
unsafe impl<T> DeviceCopy for *mut T {}
9193
unsafe impl<T: DeviceCopy> DeviceCopy for MaybeUninit<T> {}
9294
unsafe impl<T: DeviceCopy> DeviceCopy for Option<T> {}
9395
unsafe impl<L: DeviceCopy, R: DeviceCopy> DeviceCopy for Result<L, R> {}

0 commit comments

Comments
 (0)