Skip to content

Commit 4c5c08e

Browse files
committed
Deprecate the DataClone trait
We'll replace `DataClone` with a trait alias once that feature becomes available on stable.
1 parent 5fa14f0 commit 4c5c08e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/data_traits.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ 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.12.1")]
136137
pub trait DataClone : Data + DataRawClone {}
137138

139+
#[allow(deprecated)]
138140
impl<T> DataClone for T where T: Data + DataRawClone {}
139141

140142
unsafe impl<A> DataRaw for RawViewRepr<*const A> {
@@ -387,7 +389,7 @@ pub unsafe trait DataOwned : Data {
387389
/// A representation that is a lightweight view.
388390
///
389391
/// ***Internal trait, see `Data`.***
390-
pub unsafe trait DataShared : Clone + DataClone { }
392+
pub unsafe trait DataShared : Clone + Data + DataRawClone { }
391393

392394
unsafe impl<A> DataShared for OwnedRcRepr<A> {}
393395
unsafe impl<'a, A> DataShared for ViewRepr<&'a A> {}

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ mod data_traits;
151151

152152
pub use aliases::*;
153153

154+
#[allow(deprecated)]
154155
pub use data_traits::{
155156
DataRaw,
156157
DataRawMut,

0 commit comments

Comments
 (0)