@@ -27,6 +27,7 @@ use crate::{ArrayBase, CowRepr, Dimension, OwnedArcRepr, OwnedRepr, RawViewRepr,
2727/// ***Note:*** `RawData` is not an extension interface at this point.
2828/// Traits in Rust can serve many different roles. This trait is public because
2929/// it is used as a bound on public methods.
30+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
3031pub unsafe trait RawData : Sized {
3132 /// The array element type.
3233 type Elem ;
@@ -47,6 +48,7 @@ pub unsafe trait RawData: Sized {
4748/// For an array with writable elements.
4849///
4950/// ***Internal trait, see `RawData`.***
51+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
5052pub unsafe trait RawDataMut : RawData {
5153 /// If possible, ensures that the array has unique access to its data.
5254 ///
@@ -74,6 +76,7 @@ pub unsafe trait RawDataMut: RawData {
7476/// An array representation that can be cloned.
7577///
7678/// ***Internal trait, see `RawData`.***
79+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
7780pub unsafe trait RawDataClone : RawData {
7881 #[ doc( hidden) ]
7982 /// Unsafe because, `ptr` must point inside the current storage.
@@ -96,6 +99,7 @@ pub unsafe trait RawDataClone: RawData {
9699/// For an array with elements that can be accessed with safe code.
97100///
98101/// ***Internal trait, see `RawData`.***
102+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
99103pub unsafe trait Data : RawData {
100104 /// Converts the array to a uniquely owned array, cloning elements if necessary.
101105 #[ doc( hidden) ]
@@ -131,6 +135,7 @@ pub unsafe trait Data: RawData {
131135// `RawDataMut::try_ensure_unique` implementation always panics or ensures that
132136// the data is unique. You are also guaranteeing that `try_is_unique` always
133137// returns `Some(_)`.
138+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
134139pub unsafe trait DataMut : Data + RawDataMut {
135140 /// Ensures that the array has unique access to its data.
136141 #[ doc( hidden) ]
@@ -449,6 +454,7 @@ unsafe impl<'a, A> DataMut for ViewRepr<&'a mut A> {}
449454// The array storage must be initially mutable - copy on write arrays may require copying for
450455// unsharing storage before mutating it. The initially allocated storage must be mutable so
451456// that it can be mutated directly - through .raw_view_mut_unchecked() - for initialization.
457+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
452458pub unsafe trait DataOwned : Data {
453459 /// Corresponding owned data with MaybeUninit elements
454460 type MaybeUninit : DataOwned < Elem = MaybeUninit < Self :: Elem > >
@@ -467,6 +473,7 @@ pub unsafe trait DataOwned: Data {
467473/// A representation that is a lightweight view.
468474///
469475/// ***Internal trait, see `Data`.***
476+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
470477pub unsafe trait DataShared : Clone + Data + RawDataClone { }
471478
472479unsafe impl < A > DataShared for OwnedArcRepr < A > { }
0 commit comments