@@ -16,7 +16,7 @@ use rustc_span::source_map::{SourceMap, Spanned};
16
16
use rustc_span:: symbol:: { kw, sym, Symbol } ;
17
17
use rustc_span:: { MultiSpan , Span , DUMMY_SP } ;
18
18
use rustc_target:: spec:: abi:: Abi ;
19
- use syntax:: ast:: { self , AsmDialect , CrateSugar , Ident , Name } ;
19
+ use syntax:: ast:: { self , AsmDialect , CrateSugar , Ident , Name , NodeId } ;
20
20
use syntax:: ast:: { AttrVec , Attribute , FloatTy , IntTy , Label , LitKind , StrStyle , UintTy } ;
21
21
pub use syntax:: ast:: { BorrowKind , ImplPolarity , IsAuto } ;
22
22
pub use syntax:: ast:: { CaptureBy , Movability , Mutability } ;
@@ -2610,24 +2610,13 @@ pub type CaptureModeMap = NodeMap<CaptureBy>;
2610
2610
// has length > 0 if the trait is found through an chain of imports, starting with the
2611
2611
// import/use statement in the scope where the trait is used.
2612
2612
#[ derive( Clone , Debug ) ]
2613
- pub struct TraitCandidate < ID = HirId > {
2613
+ pub struct TraitCandidate {
2614
2614
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 ] > ,
2627
2616
}
2628
2617
2629
2618
// Trait method resolution
2630
- pub type TraitMap < ID = HirId > = NodeMap < Vec < TraitCandidate < ID > > > ;
2619
+ pub type TraitMap = NodeMap < Vec < TraitCandidate > > ;
2631
2620
2632
2621
// Map from the NodeId of a glob import to a list of items which are actually
2633
2622
// imported.
0 commit comments