@@ -16,7 +16,7 @@ use rustc_span::source_map::{SourceMap, Spanned};
1616use rustc_span:: symbol:: { kw, sym, Symbol } ;
1717use rustc_span:: { MultiSpan , Span , DUMMY_SP } ;
1818use rustc_target:: spec:: abi:: Abi ;
19- use syntax:: ast:: { self , AsmDialect , CrateSugar , Ident , Name } ;
19+ use syntax:: ast:: { self , AsmDialect , CrateSugar , Ident , Name , NodeId } ;
2020use syntax:: ast:: { AttrVec , Attribute , FloatTy , IntTy , Label , LitKind , StrStyle , UintTy } ;
2121pub use syntax:: ast:: { BorrowKind , ImplPolarity , IsAuto } ;
2222pub use syntax:: ast:: { CaptureBy , Movability , Mutability } ;
@@ -2610,24 +2610,13 @@ pub type CaptureModeMap = NodeMap<CaptureBy>;
26102610// has length > 0 if the trait is found through an chain of imports, starting with the
26112611// import/use statement in the scope where the trait is used.
26122612#[ derive( Clone , Debug ) ]
2613- pub struct TraitCandidate < ID = HirId > {
2613+ pub struct TraitCandidate {
26142614 pub def_id : DefId ,
2615- pub import_ids : SmallVec < [ ID ; 1 ] > ,
2616- }
2617-
2618- impl < ID > TraitCandidate < ID > {
2619- pub fn map_import_ids < F , T > ( self , f : F ) -> TraitCandidate < T >
2620- where
2621- F : Fn ( ID ) -> T ,
2622- {
2623- let TraitCandidate { def_id, import_ids } = self ;
2624- let import_ids = import_ids. into_iter ( ) . map ( f) . collect ( ) ;
2625- TraitCandidate { def_id, import_ids }
2626- }
2615+ pub import_ids : SmallVec < [ NodeId ; 1 ] > ,
26272616}
26282617
26292618// Trait method resolution
2630- pub type TraitMap < ID = HirId > = NodeMap < Vec < TraitCandidate < ID > > > ;
2619+ pub type TraitMap = NodeMap < Vec < TraitCandidate > > ;
26312620
26322621// Map from the NodeId of a glob import to a list of items which are actually
26332622// imported.
0 commit comments