refactor(data_structures): add #[repr(transparent)] to NonNull shim (#7023)

Ensure `NonNull` shim is a pure wrapper around `std::ptr::NonNull`. This should be the case anyway, but make sure.
This commit is contained in:
overlookmotel 2024-10-30 13:00:22 +00:00
parent f1fc8db2fb
commit fb1710a8cc

View file

@ -13,6 +13,7 @@ use std::{cmp::Ordering, ptr::NonNull as NativeNonNull};
/// a lint warning when that happens.
/// Then this module can be deleted, and all uses of this type can be switched to `std::ptr::NonNull`.
#[derive(Debug)]
#[repr(transparent)]
pub struct NonNull<T>(NativeNonNull<T>);
#[cfg(clippy)]