@@ -143,7 +143,7 @@ impl<'a, T: Copy + 'a, I: Iterator<Item = &'a T>> UnordItems<&'a T, I> {
143143
144144impl < T , I : Iterator < Item = T > > UnordItems < T , I > {
145145 #[ inline]
146- pub fn into_sorted < Hcx > ( self , hcx : & Hcx ) -> Vec < T >
146+ pub fn into_sorted < Hcx > ( self , hcx : & mut Hcx ) -> Vec < T >
147147 where
148148 T : ToStableHashKey < Hcx > ,
149149 {
@@ -168,7 +168,7 @@ impl<T, I: Iterator<Item = T>> UnordItems<T, I> {
168168 }
169169
170170 #[ inline]
171- pub fn collect_sorted < Hcx , C > ( self , hcx : & Hcx , cache_sort_key : bool ) -> C
171+ pub fn collect_sorted < Hcx , C > ( self , hcx : & mut Hcx , cache_sort_key : bool ) -> C
172172 where
173173 T : ToStableHashKey < Hcx > ,
174174 C : FromIterator < T > + BorrowMut < [ T ] > ,
@@ -315,7 +315,7 @@ impl<V: Eq + Hash> UnordSet<V> {
315315 /// `cache_sort_key` when the [ToStableHashKey::to_stable_hash_key] implementation
316316 /// for `V` is expensive (e.g. a `DefId -> DefPathHash` lookup).
317317 #[ inline]
318- pub fn to_sorted < Hcx > ( & self , hcx : & Hcx , cache_sort_key : bool ) -> Vec < & V >
318+ pub fn to_sorted < Hcx > ( & self , hcx : & mut Hcx , cache_sort_key : bool ) -> Vec < & V >
319319 where
320320 V : ToStableHashKey < Hcx > ,
321321 {
@@ -357,7 +357,7 @@ impl<V: Eq + Hash> UnordSet<V> {
357357 /// `cache_sort_key` when the [ToStableHashKey::to_stable_hash_key] implementation
358358 /// for `V` is expensive (e.g. a `DefId -> DefPathHash` lookup).
359359 #[ inline]
360- pub fn into_sorted < Hcx > ( self , hcx : & Hcx , cache_sort_key : bool ) -> Vec < V >
360+ pub fn into_sorted < Hcx > ( self , hcx : & mut Hcx , cache_sort_key : bool ) -> Vec < V >
361361 where
362362 V : ToStableHashKey < Hcx > ,
363363 {
@@ -555,7 +555,7 @@ impl<K: Eq + Hash, V> UnordMap<K, V> {
555555 /// `cache_sort_key` when the [ToStableHashKey::to_stable_hash_key] implementation
556556 /// for `K` is expensive (e.g. a `DefId -> DefPathHash` lookup).
557557 #[ inline]
558- pub fn to_sorted < Hcx > ( & self , hcx : & Hcx , cache_sort_key : bool ) -> Vec < ( & K , & V ) >
558+ pub fn to_sorted < Hcx > ( & self , hcx : & mut Hcx , cache_sort_key : bool ) -> Vec < ( & K , & V ) >
559559 where
560560 K : ToStableHashKey < Hcx > ,
561561 {
@@ -582,7 +582,7 @@ impl<K: Eq + Hash, V> UnordMap<K, V> {
582582 /// `cache_sort_key` when the [ToStableHashKey::to_stable_hash_key] implementation
583583 /// for `K` is expensive (e.g. a `DefId -> DefPathHash` lookup).
584584 #[ inline]
585- pub fn into_sorted < Hcx > ( self , hcx : & Hcx , cache_sort_key : bool ) -> Vec < ( K , V ) >
585+ pub fn into_sorted < Hcx > ( self , hcx : & mut Hcx , cache_sort_key : bool ) -> Vec < ( K , V ) >
586586 where
587587 K : ToStableHashKey < Hcx > ,
588588 {
@@ -610,7 +610,11 @@ impl<K: Eq + Hash, V> UnordMap<K, V> {
610610 /// `cache_sort_key` when the [ToStableHashKey::to_stable_hash_key] implementation
611611 /// for `K` is expensive (e.g. a `DefId -> DefPathHash` lookup).
612612 #[ inline]
613- pub fn values_sorted < Hcx > ( & self , hcx : & Hcx , cache_sort_key : bool ) -> impl Iterator < Item = & V >
613+ pub fn values_sorted < Hcx > (
614+ & self ,
615+ hcx : & mut Hcx ,
616+ cache_sort_key : bool ,
617+ ) -> impl Iterator < Item = & V >
614618 where
615619 K : ToStableHashKey < Hcx > ,
616620 {
@@ -710,7 +714,7 @@ impl<Hcx, V: Hash + Eq + HashStable<Hcx>> HashStable<Hcx> for UnordBag<V> {
710714
711715#[ inline]
712716fn to_sorted_vec < Hcx , T , K , I > (
713- hcx : & Hcx ,
717+ hcx : & mut Hcx ,
714718 iter : I ,
715719 cache_sort_key : bool ,
716720 extract_key : fn ( & T ) -> & K ,
0 commit comments