@@ -308,6 +308,11 @@ s_no_extra_traits! {
308
308
309
309
/// WARNING: The `PartialEq`, `Eq` and `Hash` implementations of this
310
310
/// type are unsound and will be removed in the future.
311
+ #[ deprecated(
312
+ note = "this struct has unsafe trait implementations that will be \
313
+ removed in the future",
314
+ since = "0.2.80"
315
+ ) ]
311
316
pub struct af_alg_iv {
312
317
pub ivlen: u32 ,
313
318
pub iv: [ :: c_uchar; 0 ] ,
@@ -593,6 +598,7 @@ cfg_if! {
593
598
}
594
599
}
595
600
601
+ #[ allow( deprecated) ]
596
602
impl af_alg_iv {
597
603
fn as_slice( & self ) -> & [ u8 ] {
598
604
unsafe {
@@ -604,20 +610,17 @@ cfg_if! {
604
610
}
605
611
}
606
612
607
- #[ deprecated(
608
- note = "this trait implementation is unsound and will be removed"
609
- ) ]
613
+ #[ allow( deprecated) ]
610
614
impl PartialEq for af_alg_iv {
611
615
fn eq( & self , other: & af_alg_iv) -> bool {
612
616
* self . as_slice( ) == * other. as_slice( )
613
617
}
614
618
}
615
619
616
- #[ deprecated(
617
- note = "this trait implementation is unsound and will be removed"
618
- ) ]
620
+ #[ allow( deprecated) ]
619
621
impl Eq for af_alg_iv { }
620
622
623
+ #[ allow( deprecated) ]
621
624
impl :: fmt:: Debug for af_alg_iv {
622
625
fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
623
626
f. debug_struct( "af_alg_iv" )
@@ -626,9 +629,7 @@ cfg_if! {
626
629
}
627
630
}
628
631
629
- #[ deprecated(
630
- note = "this trait implementation is unsound and will be removed"
631
- ) ]
632
+ #[ allow( deprecated) ]
632
633
impl :: hash:: Hash for af_alg_iv {
633
634
fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
634
635
self . as_slice( ) . hash( state) ;
0 commit comments