@@ -872,6 +872,7 @@ impl<T> [T] {
872
872
/// assert_eq!(Some(vec![3, 1, 2]), perms.next());
873
873
/// ```
874
874
#[ unstable( feature = "permutations" ) ]
875
+ #[ deprecated( since = "1.2.0" , reason = "not clear this should be in the stdlib" ) ]
875
876
#[ inline]
876
877
pub fn permutations ( & self ) -> Permutations < T > where T : Clone {
877
878
// NB see hack module in this file
@@ -897,6 +898,7 @@ impl<T> [T] {
897
898
/// ```
898
899
#[ unstable( feature = "permutations" ,
899
900
reason = "uncertain if this merits inclusion in std" ) ]
901
+ #[ deprecated( since = "1.2.0" , reason = "not clear this should be in the stdlib" ) ]
900
902
pub fn next_permutation ( & mut self ) -> bool where T : Ord {
901
903
core_slice:: SliceExt :: next_permutation ( self )
902
904
}
@@ -920,6 +922,7 @@ impl<T> [T] {
920
922
/// ```
921
923
#[ unstable( feature = "permutations" ,
922
924
reason = "uncertain if this merits inclusion in std" ) ]
925
+ #[ deprecated( since = "1.2.0" , reason = "not clear this should be in the stdlib" ) ]
923
926
pub fn prev_permutation ( & mut self ) -> bool where T : Ord {
924
927
core_slice:: SliceExt :: prev_permutation ( self )
925
928
}
@@ -1066,6 +1069,7 @@ impl<T: Clone, V: Borrow<[T]>> SliceConcatExt<T> for [V] {
1066
1069
/// sequence to its initial order.
1067
1070
#[ unstable( feature = "permutations" ) ]
1068
1071
#[ derive( Clone ) ]
1072
+ #[ deprecated( since = "1.2.0" , reason = "not clear this should be in the stdlib" ) ]
1069
1073
pub struct ElementSwaps {
1070
1074
sdir : Vec < SizeDirection > ,
1071
1075
/// If `true`, emit the last swap that returns the sequence to initial
@@ -1077,6 +1081,7 @@ pub struct ElementSwaps {
1077
1081
impl ElementSwaps {
1078
1082
/// Creates an `ElementSwaps` iterator for a sequence of `length` elements.
1079
1083
#[ unstable( feature = "permutations" ) ]
1084
+ #[ deprecated( since = "1.2.0" , reason = "not clear this should be in the stdlib" ) ]
1080
1085
pub fn new ( length : usize ) -> ElementSwaps {
1081
1086
// Initialize `sdir` with a direction that position should move in
1082
1087
// (all negative at the beginning) and the `size` of the
@@ -1199,6 +1204,7 @@ impl Iterator for ElementSwaps {
1199
1204
///
1200
1205
/// Generates even and odd permutations alternately.
1201
1206
#[ unstable( feature = "permutations" ) ]
1207
+ #[ deprecated( since = "1.2.0" , reason = "not clear this should be in the stdlib" ) ]
1202
1208
pub struct Permutations < T > {
1203
1209
swaps : ElementSwaps ,
1204
1210
v : Vec < T > ,
0 commit comments