@@ -39,7 +39,6 @@ use rustc::hir::map::definitions::{DefKey, DefPathData, Definitions};
39
39
use rustc:: hir:: map:: Map ;
40
40
use rustc:: lint;
41
41
use rustc:: lint:: builtin;
42
- use rustc:: middle:: cstore:: CrateStore ;
43
42
use rustc:: { bug, span_bug} ;
44
43
use rustc_data_structures:: captures:: Captures ;
45
44
use rustc_data_structures:: fx:: FxHashSet ;
@@ -172,7 +171,9 @@ struct LoweringContext<'a, 'hir: 'a> {
172
171
}
173
172
174
173
pub trait Resolver {
175
- fn cstore ( & self ) -> & dyn CrateStore ;
174
+ fn def_key ( & mut self , id : DefId ) -> DefKey ;
175
+
176
+ fn item_generics_cloned_untracked_liftimes ( & self , def : DefId , sess : & Session ) -> usize ;
176
177
177
178
/// Obtains resolution for a `NodeId` with a single resolution.
178
179
fn get_partial_res ( & mut self , id : NodeId ) -> Option < PartialRes > ;
@@ -936,14 +937,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
936
937
ret
937
938
}
938
939
939
- fn def_key ( & mut self , id : DefId ) -> DefKey {
940
- if id. is_local ( ) {
941
- self . resolver . definitions ( ) . def_key ( id. index )
942
- } else {
943
- self . resolver . cstore ( ) . def_key ( id)
944
- }
945
- }
946
-
947
940
fn lower_attrs ( & mut self , attrs : & [ Attribute ] ) -> & ' hir [ Attribute ] {
948
941
self . arena . alloc_from_iter ( attrs. iter ( ) . map ( |a| self . lower_attr ( a) ) )
949
942
}
0 commit comments