From 4c5c08e3bfb21d83bfbce5ba74b4a03829c0d923 Mon Sep 17 00:00:00 2001 From: Jim Turner Date: Mon, 19 Nov 2018 02:33:44 -0500 Subject: [PATCH] Deprecate the DataClone trait We'll replace `DataClone` with a trait alias once that feature becomes available on stable. --- src/data_traits.rs | 4 +++- src/lib.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/data_traits.rs b/src/data_traits.rs index b4a33ff53..1895d3456 100644 --- a/src/data_traits.rs +++ b/src/data_traits.rs @@ -133,8 +133,10 @@ pub unsafe trait DataMut : Data + DataRawMut { /// accessed with safe code. /// /// ***Internal trait, see `Data`.*** +#[deprecated(note="use `Data + DataRawClone` instead", since="0.12.1")] pub trait DataClone : Data + DataRawClone {} +#[allow(deprecated)] impl DataClone for T where T: Data + DataRawClone {} unsafe impl DataRaw for RawViewRepr<*const A> { @@ -387,7 +389,7 @@ pub unsafe trait DataOwned : Data { /// A representation that is a lightweight view. /// /// ***Internal trait, see `Data`.*** -pub unsafe trait DataShared : Clone + DataClone { } +pub unsafe trait DataShared : Clone + Data + DataRawClone { } unsafe impl DataShared for OwnedRcRepr {} unsafe impl<'a, A> DataShared for ViewRepr<&'a A> {} diff --git a/src/lib.rs b/src/lib.rs index 7659f6c55..83b462b97 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -151,6 +151,7 @@ mod data_traits; pub use aliases::*; +#[allow(deprecated)] pub use data_traits::{ DataRaw, DataRawMut,