@@ -27,10 +27,10 @@ use {
2727/// does not imply any ownership or lifetime; pointers to elements in the array
2828/// may not be safe to dereference.
2929///
30- /// ***Note:*** `DataRaw ` is not an extension interface at this point.
30+ /// ***Note:*** `RawData ` is not an extension interface at this point.
3131/// Traits in Rust can serve many different roles. This trait is public because
3232/// it is used as a bound on public methods.
33- pub unsafe trait DataRaw : Sized {
33+ pub unsafe trait RawData : Sized {
3434 /// The array element type.
3535 type Elem ;
3636
@@ -45,8 +45,8 @@ pub unsafe trait DataRaw : Sized {
4545///
4646/// For an array with writable elements.
4747///
48- /// ***Internal trait, see `DataRaw `.***
49- pub unsafe trait DataRawMut : DataRaw {
48+ /// ***Internal trait, see `RawData `.***
49+ pub unsafe trait RawDataMut : RawData {
5050 /// If possible, ensures that the array has unique access to its data.
5151 ///
5252 /// If `Self` provides safe mutable access to array elements, then it
@@ -68,8 +68,8 @@ pub unsafe trait DataRawMut : DataRaw {
6868///
6969/// An array representation that can be cloned.
7070///
71- /// ***Internal trait, see `DataRaw `.***
72- pub unsafe trait DataRawClone : DataRaw {
71+ /// ***Internal trait, see `RawData `.***
72+ pub unsafe trait RawDataClone : RawData {
7373 #[ doc( hidden) ]
7474 /// Unsafe because, `ptr` must point inside the current storage.
7575 unsafe fn clone_with_ptr ( & self , ptr : * mut Self :: Elem ) -> ( Self , * mut Self :: Elem ) ;
@@ -86,8 +86,8 @@ pub unsafe trait DataRawClone : DataRaw {
8686///
8787/// For an array with elements that can be accessed with safe code.
8888///
89- /// ***Internal trait, see `DataRaw `.***
90- pub unsafe trait Data : DataRaw {
89+ /// ***Internal trait, see `RawData `.***
90+ pub unsafe trait Data : RawData {
9191 /// Converts the array to a uniquely owned array, cloning elements if necessary.
9292 #[ doc( hidden) ]
9393 fn into_owned < D > ( self_ : ArrayBase < Self , D > ) -> ArrayBase < OwnedRepr < Self :: Elem > , D >
@@ -105,10 +105,10 @@ pub unsafe trait Data : DataRaw {
105105// # For implementers
106106//
107107// If you implement the `DataMut` trait, you are guaranteeing that the
108- // `DataRawMut ::try_ensure_unique` implementation always panics or ensures that
108+ // `RawDataMut ::try_ensure_unique` implementation always panics or ensures that
109109// the data is unique. You are also guaranteeing that `try_is_unique` always
110110// returns `Some(_)`.
111- pub unsafe trait DataMut : Data + DataRawMut {
111+ pub unsafe trait DataMut : Data + RawDataMut {
112112 /// Ensures that the array has unique access to its data.
113113 #[ doc( hidden) ]
114114 #[ inline]
@@ -133,35 +133,35 @@ pub unsafe trait DataMut : Data + DataRawMut {
133133/// accessed with safe code.
134134///
135135/// ***Internal trait, see `Data`.***
136- #[ deprecated( note="use `Data + DataRawClone ` instead" , since="0.13" ) ]
137- pub trait DataClone : Data + DataRawClone { }
136+ #[ deprecated( note="use `Data + RawDataClone ` instead" , since="0.13" ) ]
137+ pub trait DataClone : Data + RawDataClone { }
138138
139139#[ allow( deprecated) ]
140- impl < T > DataClone for T where T : Data + DataRawClone { }
140+ impl < T > DataClone for T where T : Data + RawDataClone { }
141141
142- unsafe impl < A > DataRaw for RawViewRepr < * const A > {
142+ unsafe impl < A > RawData for RawViewRepr < * const A > {
143143 type Elem = A ;
144144 fn _data_slice ( & self ) -> Option < & [ A ] > {
145145 None
146146 }
147147 private_impl ! { }
148148}
149149
150- unsafe impl < A > DataRawClone for RawViewRepr < * const A > {
150+ unsafe impl < A > RawDataClone for RawViewRepr < * const A > {
151151 unsafe fn clone_with_ptr ( & self , ptr : * mut Self :: Elem ) -> ( Self , * mut Self :: Elem ) {
152152 ( * self , ptr)
153153 }
154154}
155155
156- unsafe impl < A > DataRaw for RawViewRepr < * mut A > {
156+ unsafe impl < A > RawData for RawViewRepr < * mut A > {
157157 type Elem = A ;
158158 fn _data_slice ( & self ) -> Option < & [ A ] > {
159159 None
160160 }
161161 private_impl ! { }
162162}
163163
164- unsafe impl < A > DataRawMut for RawViewRepr < * mut A > {
164+ unsafe impl < A > RawDataMut for RawViewRepr < * mut A > {
165165 #[ inline]
166166 fn try_ensure_unique < D > ( _: & mut ArrayBase < Self , D > )
167167 where Self : Sized ,
@@ -174,13 +174,13 @@ unsafe impl<A> DataRawMut for RawViewRepr<*mut A> {
174174 }
175175}
176176
177- unsafe impl < A > DataRawClone for RawViewRepr < * mut A > {
177+ unsafe impl < A > RawDataClone for RawViewRepr < * mut A > {
178178 unsafe fn clone_with_ptr ( & self , ptr : * mut Self :: Elem ) -> ( Self , * mut Self :: Elem ) {
179179 ( * self , ptr)
180180 }
181181}
182182
183- unsafe impl < A > DataRaw for OwnedArcRepr < A > {
183+ unsafe impl < A > RawData for OwnedArcRepr < A > {
184184 type Elem = A ;
185185 fn _data_slice ( & self ) -> Option < & [ A ] > {
186186 Some ( & self . 0 )
@@ -189,7 +189,7 @@ unsafe impl<A> DataRaw for OwnedArcRepr<A> {
189189}
190190
191191// NOTE: Copy on write
192- unsafe impl < A > DataRawMut for OwnedArcRepr < A >
192+ unsafe impl < A > RawDataMut for OwnedArcRepr < A >
193193where
194194 A : Clone ,
195195{
@@ -246,22 +246,22 @@ unsafe impl<A> Data for OwnedArcRepr<A> {
246246
247247unsafe impl < A > DataMut for OwnedArcRepr < A > where A : Clone { }
248248
249- unsafe impl < A > DataRawClone for OwnedArcRepr < A > {
249+ unsafe impl < A > RawDataClone for OwnedArcRepr < A > {
250250 unsafe fn clone_with_ptr ( & self , ptr : * mut Self :: Elem ) -> ( Self , * mut Self :: Elem ) {
251251 // pointer is preserved
252252 ( self . clone ( ) , ptr)
253253 }
254254}
255255
256- unsafe impl < A > DataRaw for OwnedRepr < A > {
256+ unsafe impl < A > RawData for OwnedRepr < A > {
257257 type Elem = A ;
258258 fn _data_slice ( & self ) -> Option < & [ A ] > {
259259 Some ( & self . 0 )
260260 }
261261 private_impl ! { }
262262}
263263
264- unsafe impl < A > DataRawMut for OwnedRepr < A > {
264+ unsafe impl < A > RawDataMut for OwnedRepr < A > {
265265 #[ inline]
266266 fn try_ensure_unique < D > ( _: & mut ArrayBase < Self , D > )
267267 where Self : Sized ,
@@ -287,7 +287,7 @@ unsafe impl<A> Data for OwnedRepr<A> {
287287
288288unsafe impl < A > DataMut for OwnedRepr < A > { }
289289
290- unsafe impl < A > DataRawClone for OwnedRepr < A >
290+ unsafe impl < A > RawDataClone for OwnedRepr < A >
291291 where A : Clone
292292{
293293 unsafe fn clone_with_ptr ( & self , ptr : * mut Self :: Elem ) -> ( Self , * mut Self :: Elem ) {
@@ -313,7 +313,7 @@ unsafe impl<A> DataRawClone for OwnedRepr<A>
313313 }
314314}
315315
316- unsafe impl < ' a , A > DataRaw for ViewRepr < & ' a A > {
316+ unsafe impl < ' a , A > RawData for ViewRepr < & ' a A > {
317317 type Elem = A ;
318318 fn _data_slice ( & self ) -> Option < & [ A ] > {
319319 None
@@ -331,21 +331,21 @@ unsafe impl<'a, A> Data for ViewRepr<&'a A> {
331331 }
332332}
333333
334- unsafe impl < ' a , A > DataRawClone for ViewRepr < & ' a A > {
334+ unsafe impl < ' a , A > RawDataClone for ViewRepr < & ' a A > {
335335 unsafe fn clone_with_ptr ( & self , ptr : * mut Self :: Elem ) -> ( Self , * mut Self :: Elem ) {
336336 ( * self , ptr)
337337 }
338338}
339339
340- unsafe impl < ' a , A > DataRaw for ViewRepr < & ' a mut A > {
340+ unsafe impl < ' a , A > RawData for ViewRepr < & ' a mut A > {
341341 type Elem = A ;
342342 fn _data_slice ( & self ) -> Option < & [ A ] > {
343343 None
344344 }
345345 private_impl ! { }
346346}
347347
348- unsafe impl < ' a , A > DataRawMut for ViewRepr < & ' a mut A > {
348+ unsafe impl < ' a , A > RawDataMut for ViewRepr < & ' a mut A > {
349349 #[ inline]
350350 fn try_ensure_unique < D > ( _: & mut ArrayBase < Self , D > )
351351 where Self : Sized ,
@@ -389,7 +389,7 @@ pub unsafe trait DataOwned : Data {
389389/// A representation that is a lightweight view.
390390///
391391/// ***Internal trait, see `Data`.***
392- pub unsafe trait DataShared : Clone + Data + DataRawClone { }
392+ pub unsafe trait DataShared : Clone + Data + RawDataClone { }
393393
394394unsafe impl < A > DataShared for OwnedRcRepr < A > { }
395395unsafe impl < ' a , A > DataShared for ViewRepr < & ' a A > { }
0 commit comments