File tree 3 files changed +28
-2
lines changed
3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,9 @@ macro_rules! s_no_extra_traits {
114
114
$( #[ $attr] ) *
115
115
pub struct $i { $( $field) * }
116
116
}
117
+ #[ allow( deprecated) ]
117
118
impl :: Copy for $i { }
119
+ #[ allow( deprecated) ]
118
120
impl :: Clone for $i {
119
121
fn clone( & self ) -> $i { * self }
120
122
}
Original file line number Diff line number Diff line change @@ -306,6 +306,13 @@ s_no_extra_traits! {
306
306
pub salg_name: [ :: c_uchar; 64 ] ,
307
307
}
308
308
309
+ /// WARNING: The `PartialEq`, `Eq` and `Hash` implementations of this
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
+ ) ]
309
316
pub struct af_alg_iv {
310
317
pub ivlen: u32 ,
311
318
pub iv: [ :: c_uchar; 0 ] ,
@@ -591,6 +598,7 @@ cfg_if! {
591
598
}
592
599
}
593
600
601
+ #[ allow( deprecated) ]
594
602
impl af_alg_iv {
595
603
fn as_slice( & self ) -> & [ u8 ] {
596
604
unsafe {
@@ -602,22 +610,26 @@ cfg_if! {
602
610
}
603
611
}
604
612
613
+ #[ allow( deprecated) ]
605
614
impl PartialEq for af_alg_iv {
606
615
fn eq( & self , other: & af_alg_iv) -> bool {
607
616
* self . as_slice( ) == * other. as_slice( )
608
617
}
609
618
}
610
619
620
+ #[ allow( deprecated) ]
611
621
impl Eq for af_alg_iv { }
612
622
623
+ #[ allow( deprecated) ]
613
624
impl :: fmt:: Debug for af_alg_iv {
614
625
fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
615
626
f. debug_struct( "af_alg_iv" )
616
- . field( "iv " , & self . as_slice ( ) )
627
+ . field( "ivlen " , & self . ivlen )
617
628
. finish( )
618
629
}
619
630
}
620
631
632
+ #[ allow( deprecated) ]
621
633
impl :: hash:: Hash for af_alg_iv {
622
634
fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
623
635
self . as_slice( ) . hash( state) ;
Original file line number Diff line number Diff line change @@ -538,6 +538,13 @@ s_no_extra_traits! {
538
538
pub salg_name: [ :: c_uchar; 64 ] ,
539
539
}
540
540
541
+ /// WARNING: The `PartialEq`, `Eq` and `Hash` implementations of this
542
+ /// type are unsound and will be removed in the future.
543
+ #[ deprecated(
544
+ note = "this struct has unsafe trait implementations that will be \
545
+ removed in the future",
546
+ since = "0.2.80"
547
+ ) ]
541
548
pub struct af_alg_iv {
542
549
pub ivlen: u32 ,
543
550
pub iv: [ :: c_uchar; 0 ] ,
@@ -781,6 +788,7 @@ cfg_if! {
781
788
}
782
789
}
783
790
791
+ #[ allow( deprecated) ]
784
792
impl af_alg_iv {
785
793
fn as_slice( & self ) -> & [ u8 ] {
786
794
unsafe {
@@ -792,22 +800,26 @@ cfg_if! {
792
800
}
793
801
}
794
802
803
+ #[ allow( deprecated) ]
795
804
impl PartialEq for af_alg_iv {
796
805
fn eq( & self , other: & af_alg_iv) -> bool {
797
806
* self . as_slice( ) == * other. as_slice( )
798
807
}
799
808
}
800
809
810
+ #[ allow( deprecated) ]
801
811
impl Eq for af_alg_iv { }
802
812
813
+ #[ allow( deprecated) ]
803
814
impl :: fmt:: Debug for af_alg_iv {
804
815
fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
805
816
f. debug_struct( "af_alg_iv" )
806
- . field( "iv " , & self . as_slice ( ) )
817
+ . field( "ivlen " , & self . ivlen )
807
818
. finish( )
808
819
}
809
820
}
810
821
822
+ #[ allow( deprecated) ]
811
823
impl :: hash:: Hash for af_alg_iv {
812
824
fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
813
825
self . as_slice( ) . hash( state) ;
You can’t perform that action at this time.
0 commit comments