3131 /// Create an `RawArrayView<A, D>` from shape information and a raw pointer
3232 /// to the elements.
3333 ///
34- /// Unsafe because caller is responsible for ensuring all of the following:
34+ /// # Safety
35+ ///
36+ /// The caller is responsible for ensuring all of the following:
3537 ///
3638 /// * `ptr` must be non-null, and it must be safe to [`.offset()`] `ptr` by
3739 /// zero.
@@ -77,10 +79,12 @@ where
7779
7880 /// Converts to a read-only view of the array.
7981 ///
80- /// **Warning** from a safety standpoint, this is equivalent to
81- /// dereferencing a raw pointer for every element in the array. You must
82- /// ensure that all of the data is valid, ensure that the pointer is
83- /// aligned, and choose the correct lifetime.
82+ /// # Safety
83+ ///
84+ /// From a safety standpoint, this is equivalent to dereferencing a raw
85+ /// pointer for every element in the array. You must ensure that all of the
86+ /// data is valid, ensure that the pointer is aligned, and choose the
87+ /// correct lifetime.
8488 #[ inline]
8589 pub unsafe fn deref_into_view < ' a > ( self ) -> ArrayView < ' a , A , D > {
8690 debug_assert ! (
@@ -163,7 +167,9 @@ where
163167 /// Create an `RawArrayViewMut<A, D>` from shape information and a raw
164168 /// pointer to the elements.
165169 ///
166- /// Unsafe because caller is responsible for ensuring all of the following:
170+ /// # Safety
171+ ///
172+ /// The caller is responsible for ensuring all of the following:
167173 ///
168174 /// * `ptr` must be non-null, and it must be safe to [`.offset()`] `ptr` by
169175 /// zero.
@@ -215,10 +221,12 @@ where
215221
216222 /// Converts to a read-only view of the array.
217223 ///
218- /// **Warning** from a safety standpoint, this is equivalent to
219- /// dereferencing a raw pointer for every element in the array. You must
220- /// ensure that all of the data is valid, ensure that the pointer is
221- /// aligned, and choose the correct lifetime.
224+ /// # Safety
225+ ///
226+ /// From a safety standpoint, this is equivalent to dereferencing a raw
227+ /// pointer for every element in the array. You must ensure that all of the
228+ /// data is valid, ensure that the pointer is aligned, and choose the
229+ /// correct lifetime.
222230 #[ inline]
223231 pub unsafe fn deref_into_view < ' a > ( self ) -> ArrayView < ' a , A , D > {
224232 debug_assert ! (
@@ -230,10 +238,12 @@ where
230238
231239 /// Converts to a mutable view of the array.
232240 ///
233- /// **Warning** from a safety standpoint, this is equivalent to
234- /// dereferencing a raw pointer for every element in the array. You must
235- /// ensure that all of the data is valid, ensure that the pointer is
236- /// aligned, and choose the correct lifetime.
241+ /// # Safety
242+ ///
243+ /// From a safety standpoint, this is equivalent to dereferencing a raw
244+ /// pointer for every element in the array. You must ensure that all of the
245+ /// data is valid, ensure that the pointer is aligned, and choose the
246+ /// correct lifetime.
237247 #[ inline]
238248 pub unsafe fn deref_into_view_mut < ' a > ( self ) -> ArrayViewMut < ' a , A , D > {
239249 debug_assert ! (
0 commit comments