8383/// due to the search functionality located there.
8484/// Later, this trait should be removed completely and the search functionality moved to a separate crate,
8585/// accessible from the ra_assists crate.
86- pub trait ImportsLocator < ' a > {
86+ pub trait ImportsLocator {
8787 /// Finds all imports for the given name and the module that contains this name.
8888 fn find_imports (
8989 & mut self ,
@@ -97,14 +97,14 @@ pub trait ImportsLocator<'a> {
9797///
9898/// Assists are returned in the "resolved" state, that is with edit fully
9999/// computed.
100- pub fn assists_with_imports_locator < ' a , H , F : ' a > (
100+ pub fn assists_with_imports_locator < H , F > (
101101 db : & H ,
102102 range : FileRange ,
103103 mut imports_locator : F ,
104104) -> Vec < ResolvedAssist >
105105where
106106 H : HirDatabase + ' static ,
107- F : ImportsLocator < ' a > ,
107+ F : ImportsLocator ,
108108{
109109 AssistCtx :: with_ctx ( db, range, true , |ctx| {
110110 let mut assists = assists:: all ( )
@@ -222,7 +222,7 @@ mod assists {
222222 ]
223223 }
224224
225- pub ( crate ) fn all_with_imports_locator < ' a , DB : HirDatabase , F : ImportsLocator < ' a > > (
225+ pub ( crate ) fn all_with_imports_locator < ' a , DB : HirDatabase , F : ImportsLocator > (
226226 ) -> & ' a [ fn ( AssistCtx < DB > , & mut F ) -> Option < Assist > ] {
227227 & [ auto_import:: auto_import]
228228 }
@@ -264,7 +264,7 @@ mod helpers {
264264 assert_eq_text ! ( after, & actual) ;
265265 }
266266
267- pub ( crate ) fn check_assist_with_imports_locator < ' a , F : ImportsLocator < ' a > > (
267+ pub ( crate ) fn check_assist_with_imports_locator < F : ImportsLocator > (
268268 assist : fn ( AssistCtx < TestDB > , & mut F ) -> Option < Assist > ,
269269 imports_locator : & mut F ,
270270 before : & str ,
@@ -366,7 +366,7 @@ mod helpers {
366366 assert ! ( assist. is_none( ) ) ;
367367 }
368368
369- pub ( crate ) fn check_assist_with_imports_locator_not_applicable < ' a , F : ImportsLocator < ' a > > (
369+ pub ( crate ) fn check_assist_with_imports_locator_not_applicable < F : ImportsLocator > (
370370 assist : fn ( AssistCtx < TestDB > , & mut F ) -> Option < Assist > ,
371371 imports_locator : & mut F ,
372372 before : & str ,
0 commit comments