@@ -30,31 +30,15 @@ pub trait Map<K, V>: Mutable {
3030 fn contains_key ( & self , key : & K ) -> bool ;
3131
3232 // Visits all keys and values
33- #[ cfg( stage0) ]
34- fn each < ' a > ( & ' a self , f : & fn ( & K , & ' a V ) -> bool ) ;
35- // Visits all keys and values
36- #[ cfg( not( stage0) ) ]
3733 fn each < ' a > ( & ' a self , f : & fn ( & K , & ' a V ) -> bool ) -> bool ;
3834
3935 /// Visit all keys
40- #[ cfg( stage0) ]
41- fn each_key ( & self , f : & fn ( & K ) -> bool ) ;
42- /// Visit all keys
43- #[ cfg( not( stage0) ) ]
4436 fn each_key ( & self , f : & fn ( & K ) -> bool ) -> bool ;
4537
4638 /// Visit all values
47- #[ cfg( stage0) ]
48- fn each_value < ' a > ( & ' a self , f : & fn ( & ' a V ) -> bool ) ;
49- /// Visit all values
50- #[ cfg( not( stage0) ) ]
5139 fn each_value < ' a > ( & ' a self , f : & fn ( & ' a V ) -> bool ) -> bool ;
5240
5341 /// Iterate over the map and mutate the contained values
54- #[ cfg( stage0) ]
55- fn mutate_values ( & mut self , f : & fn ( & K , & mut V ) -> bool ) ;
56- /// Iterate over the map and mutate the contained values
57- #[ cfg( not( stage0) ) ]
5842 fn mutate_values ( & mut self , f : & fn ( & K , & mut V ) -> bool ) -> bool ;
5943
6044 /// Return a reference to the value corresponding to the key
@@ -81,43 +65,6 @@ pub trait Map<K, V>: Mutable {
8165 fn pop ( & mut self , k : & K ) -> Option < V > ;
8266}
8367
84- #[ cfg( stage0) ]
85- pub trait Set < T > : Mutable {
86- /// Return true if the set contains a value
87- fn contains ( & self , value : & T ) -> bool ;
88-
89- /// Add a value to the set. Return true if the value was not already
90- /// present in the set.
91- fn insert ( & mut self , value : T ) -> bool ;
92-
93- /// Remove a value from the set. Return true if the value was
94- /// present in the set.
95- fn remove ( & mut self , value : & T ) -> bool ;
96-
97- /// Return true if the set has no elements in common with `other`.
98- /// This is equivalent to checking for an empty intersection.
99- fn is_disjoint ( & self , other : & Self ) -> bool ;
100-
101- /// Return true if the set is a subset of another
102- fn is_subset ( & self , other : & Self ) -> bool ;
103-
104- /// Return true if the set is a superset of another
105- fn is_superset ( & self , other : & Self ) -> bool ;
106-
107- /// Visit the values representing the difference
108- fn difference ( & self , other : & Self , f : & fn ( & T ) -> bool ) ;
109-
110- /// Visit the values representing the symmetric difference
111- fn symmetric_difference ( & self , other : & Self , f : & fn ( & T ) -> bool ) ;
112-
113- /// Visit the values representing the intersection
114- fn intersection ( & self , other : & Self , f : & fn ( & T ) -> bool ) ;
115-
116- /// Visit the values representing the union
117- fn union ( & self , other : & Self , f : & fn ( & T ) -> bool ) ;
118- }
119-
120- #[ cfg( not( stage0) ) ]
12168pub trait Set < T > : Mutable {
12269 /// Return true if the set contains a value
12370 fn contains ( & self , value : & T ) -> bool ;
0 commit comments