diff --git a/src/macros.rs b/src/macros.rs index b314f60ff264ddd58c69fb8500c188fa4a94b317..0ef64d572f3a6d989b331a52ec381cd8a1356032 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -114,7 +114,9 @@ macro_rules! s_no_extra_traits { $(#[$attr])* pub struct $i { $($field)* } } + #[allow(deprecated)] impl ::Copy for $i {} + #[allow(deprecated)] impl ::Clone for $i { fn clone(&self) -> $i { *self } } diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index c1a04fb7dc384637c8bd04fa9797056f84245140..38d3ba7da5302a778cfa330a73bc47a112b3650c 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -308,6 +308,11 @@ s_no_extra_traits! { /// WARNING: The `PartialEq`, `Eq` and `Hash` implementations of this /// type are unsound and will be removed in the future. + #[deprecated( + note = "this struct has unsafe trait implementations that will be \ + removed in the future", + since = "0.2.80" + )] pub struct af_alg_iv { pub ivlen: u32, pub iv: [::c_uchar; 0], @@ -593,6 +598,7 @@ cfg_if! { } } + #[allow(deprecated)] impl af_alg_iv { fn as_slice(&self) -> &[u8] { unsafe { @@ -604,20 +610,17 @@ cfg_if! { } } - #[deprecated( - note = "this trait implementation is unsound and will be removed" - )] + #[allow(deprecated)] impl PartialEq for af_alg_iv { fn eq(&self, other: &af_alg_iv) -> bool { *self.as_slice() == *other.as_slice() } } - #[deprecated( - note = "this trait implementation is unsound and will be removed" - )] + #[allow(deprecated)] impl Eq for af_alg_iv {} + #[allow(deprecated)] impl ::fmt::Debug for af_alg_iv { fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { f.debug_struct("af_alg_iv") @@ -626,9 +629,7 @@ cfg_if! { } } - #[deprecated( - note = "this trait implementation is unsound and will be removed" - )] + #[allow(deprecated)] impl ::hash::Hash for af_alg_iv { fn hash<H: ::hash::Hasher>(&self, state: &mut H) { self.as_slice().hash(state); diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index de4714ed63c7680467a37bbf7f8954da4df42eda..adf922a411bdd6f1bc2eed4c58e6f4a009dc5380 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -540,6 +540,11 @@ s_no_extra_traits! { /// WARNING: The `PartialEq`, `Eq` and `Hash` implementations of this /// type are unsound and will be removed in the future. + #[deprecated( + note = "this struct has unsafe trait implementations that will be \ + removed in the future", + since = "0.2.80" + )] pub struct af_alg_iv { pub ivlen: u32, pub iv: [::c_uchar; 0], @@ -783,6 +788,7 @@ cfg_if! { } } + #[allow(deprecated)] impl af_alg_iv { fn as_slice(&self) -> &[u8] { unsafe { @@ -794,20 +800,17 @@ cfg_if! { } } - #[deprecated( - note = "this trait implementation is unsound and will be removed" - )] + #[allow(deprecated)] impl PartialEq for af_alg_iv { fn eq(&self, other: &af_alg_iv) -> bool { *self.as_slice() == *other.as_slice() } } - #[deprecated( - note = "this trait implementation is unsound and will be removed" - )] + #[allow(deprecated)] impl Eq for af_alg_iv {} + #[allow(deprecated)] impl ::fmt::Debug for af_alg_iv { fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { f.debug_struct("af_alg_iv") @@ -816,9 +819,7 @@ cfg_if! { } } - #[deprecated( - note = "this trait implementation is unsound and will be removed" - )] + #[allow(deprecated)] impl ::hash::Hash for af_alg_iv { fn hash<H: ::hash::Hasher>(&self, state: &mut H) { self.as_slice().hash(state);