11use crate :: ich;
22use crate :: middle:: cstore:: CrateStore ;
3- use crate :: ty:: { fast_reject , TyCtxt } ;
3+ use crate :: ty:: TyCtxt ;
44
55use rustc_ast as ast;
6- use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
6+ use rustc_data_structures:: fx:: FxHashSet ;
77use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
88use rustc_data_structures:: sync:: Lrc ;
99use rustc_hir as hir;
@@ -14,9 +14,6 @@ use rustc_span::source_map::SourceMap;
1414use rustc_span:: symbol:: Symbol ;
1515use rustc_span:: { BytePos , CachingSourceMapView , SourceFile , Span , SpanData } ;
1616
17- use smallvec:: SmallVec ;
18- use std:: cmp:: Ord ;
19-
2017fn compute_ignored_attr_names ( ) -> FxHashSet < Symbol > {
2118 debug_assert ! ( !ich:: IGNORED_ATTRIBUTES . is_empty( ) ) ;
2219 ich:: IGNORED_ATTRIBUTES . iter ( ) . copied ( ) . collect ( )
@@ -241,39 +238,3 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
241238}
242239
243240impl rustc_session:: HashStableContext for StableHashingContext < ' a > { }
244-
245- pub fn hash_stable_trait_impls < ' a > (
246- hcx : & mut StableHashingContext < ' a > ,
247- hasher : & mut StableHasher ,
248- blanket_impls : & [ DefId ] ,
249- non_blanket_impls : & FxHashMap < fast_reject:: SimplifiedType , Vec < DefId > > ,
250- ) {
251- {
252- let mut blanket_impls: SmallVec < [ _ ; 8 ] > =
253- blanket_impls. iter ( ) . map ( |& def_id| hcx. def_path_hash ( def_id) ) . collect ( ) ;
254-
255- if blanket_impls. len ( ) > 1 {
256- blanket_impls. sort_unstable ( ) ;
257- }
258-
259- blanket_impls. hash_stable ( hcx, hasher) ;
260- }
261-
262- {
263- let mut keys: SmallVec < [ _ ; 8 ] > =
264- non_blanket_impls. keys ( ) . map ( |k| ( k, k. map_def ( |d| hcx. def_path_hash ( d) ) ) ) . collect ( ) ;
265- keys. sort_unstable_by ( |& ( _, ref k1) , & ( _, ref k2) | k1. cmp ( k2) ) ;
266- keys. len ( ) . hash_stable ( hcx, hasher) ;
267- for ( key, ref stable_key) in keys {
268- stable_key. hash_stable ( hcx, hasher) ;
269- let mut impls: SmallVec < [ _ ; 8 ] > =
270- non_blanket_impls[ key] . iter ( ) . map ( |& impl_id| hcx. def_path_hash ( impl_id) ) . collect ( ) ;
271-
272- if impls. len ( ) > 1 {
273- impls. sort_unstable ( ) ;
274- }
275-
276- impls. hash_stable ( hcx, hasher) ;
277- }
278- }
279- }
0 commit comments