@@ -27,6 +27,7 @@ use crate::{ArrayBase, CowRepr, Dimension, OwnedArcRepr, OwnedRepr, RawViewRepr,
27
27
/// ***Note:*** `RawData` is not an extension interface at this point.
28
28
/// Traits in Rust can serve many different roles. This trait is public because
29
29
/// it is used as a bound on public methods.
30
+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
30
31
pub unsafe trait RawData : Sized {
31
32
/// The array element type.
32
33
type Elem ;
@@ -47,6 +48,7 @@ pub unsafe trait RawData: Sized {
47
48
/// For an array with writable elements.
48
49
///
49
50
/// ***Internal trait, see `RawData`.***
51
+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
50
52
pub unsafe trait RawDataMut : RawData {
51
53
/// If possible, ensures that the array has unique access to its data.
52
54
///
@@ -74,6 +76,7 @@ pub unsafe trait RawDataMut: RawData {
74
76
/// An array representation that can be cloned.
75
77
///
76
78
/// ***Internal trait, see `RawData`.***
79
+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
77
80
pub unsafe trait RawDataClone : RawData {
78
81
#[ doc( hidden) ]
79
82
/// Unsafe because, `ptr` must point inside the current storage.
@@ -96,6 +99,7 @@ pub unsafe trait RawDataClone: RawData {
96
99
/// For an array with elements that can be accessed with safe code.
97
100
///
98
101
/// ***Internal trait, see `RawData`.***
102
+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
99
103
pub unsafe trait Data : RawData {
100
104
/// Converts the array to a uniquely owned array, cloning elements if necessary.
101
105
#[ doc( hidden) ]
@@ -131,6 +135,7 @@ pub unsafe trait Data: RawData {
131
135
// `RawDataMut::try_ensure_unique` implementation always panics or ensures that
132
136
// the data is unique. You are also guaranteeing that `try_is_unique` always
133
137
// returns `Some(_)`.
138
+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
134
139
pub unsafe trait DataMut : Data + RawDataMut {
135
140
/// Ensures that the array has unique access to its data.
136
141
#[ doc( hidden) ]
@@ -449,6 +454,7 @@ unsafe impl<'a, A> DataMut for ViewRepr<&'a mut A> {}
449
454
// The array storage must be initially mutable - copy on write arrays may require copying for
450
455
// unsharing storage before mutating it. The initially allocated storage must be mutable so
451
456
// that it can be mutated directly - through .raw_view_mut_unchecked() - for initialization.
457
+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
452
458
pub unsafe trait DataOwned : Data {
453
459
/// Corresponding owned data with MaybeUninit elements
454
460
type MaybeUninit : DataOwned < Elem = MaybeUninit < Self :: Elem > >
@@ -467,6 +473,7 @@ pub unsafe trait DataOwned: Data {
467
473
/// A representation that is a lightweight view.
468
474
///
469
475
/// ***Internal trait, see `Data`.***
476
+ #[ allow( clippy:: missing_safety_doc) ] // not implementable downstream
470
477
pub unsafe trait DataShared : Clone + Data + RawDataClone { }
471
478
472
479
unsafe impl < A > DataShared for OwnedArcRepr < A > { }
0 commit comments