@@ -16,7 +16,7 @@ use ::core::iter::{FromIterator, FusedIterator};
1616use :: core:: ops:: { Index , IndexMut , RangeBounds } ;
1717use :: core:: slice:: { Iter as SliceIter , IterMut as SliceIterMut } ;
1818
19- #[ cfg( has_std ) ]
19+ #[ cfg( feature = "std" ) ]
2020use std:: collections:: hash_map:: RandomState ;
2121
2222use self :: core:: IndexMapCore ;
@@ -67,12 +67,12 @@ pub use self::core::{Entry, OccupiedEntry, VacantEntry};
6767/// assert_eq!(letters[&'u'], 1);
6868/// assert_eq!(letters.get(&'y'), None);
6969/// ```
70- #[ cfg( has_std ) ]
70+ #[ cfg( feature = "std" ) ]
7171pub struct IndexMap < K , V , S = RandomState > {
7272 pub ( crate ) core : IndexMapCore < K , V > ,
7373 hash_builder : S ,
7474}
75- #[ cfg( not( has_std ) ) ]
75+ #[ cfg( not( feature = "std" ) ) ]
7676pub struct IndexMap < K , V , S > {
7777 pub ( crate ) core : IndexMapCore < K , V > ,
7878 hash_builder : S ,
@@ -140,7 +140,7 @@ where
140140 }
141141}
142142
143- #[ cfg( has_std ) ]
143+ #[ cfg( feature = "std" ) ]
144144impl < K , V > IndexMap < K , V > {
145145 /// Create a new map. (Does not allocate.)
146146 #[ inline]
@@ -1391,7 +1391,7 @@ where
13911391 }
13921392}
13931393
1394- #[ cfg( all ( has_std , rustc_1_51 ) ) ]
1394+ #[ cfg( feature = "std" ) ]
13951395impl < K , V , const N : usize > From < [ ( K , V ) ; N ] > for IndexMap < K , V , RandomState >
13961396where
13971397 K : Hash + Eq ,
@@ -1906,7 +1906,7 @@ mod tests {
19061906 }
19071907
19081908 #[ test]
1909- #[ cfg( all ( has_std , rustc_1_51 ) ) ]
1909+ #[ cfg( feature = "std" ) ]
19101910 fn from_array ( ) {
19111911 let map = IndexMap :: from ( [ ( 1 , 2 ) , ( 3 , 4 ) ] ) ;
19121912 let mut expected = IndexMap :: new ( ) ;
0 commit comments