diff options
Diffstat (limited to 'crates/ide_assists/src')
-rw-r--r-- | crates/ide_assists/src/handlers/auto_import.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ide_assists/src/handlers/auto_import.rs b/crates/ide_assists/src/handlers/auto_import.rs index e9993a7cc..182547589 100644 --- a/crates/ide_assists/src/handlers/auto_import.rs +++ b/crates/ide_assists/src/handlers/auto_import.rs | |||
@@ -111,7 +111,9 @@ pub(crate) fn auto_import(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
111 | Some(()) | 111 | Some(()) |
112 | } | 112 | } |
113 | 113 | ||
114 | pub(super) fn find_importable_node(ctx: &AssistContext) -> Option<(ImportAssets, SyntaxNode)> { | 114 | pub(super) fn find_importable_node<'a>( |
115 | ctx: &'a AssistContext, | ||
116 | ) -> Option<(ImportAssets<'a>, SyntaxNode)> { | ||
115 | if let Some(path_under_caret) = ctx.find_node_at_offset_with_descend::<ast::Path>() { | 117 | if let Some(path_under_caret) = ctx.find_node_at_offset_with_descend::<ast::Path>() { |
116 | ImportAssets::for_exact_path(&path_under_caret, &ctx.sema) | 118 | ImportAssets::for_exact_path(&path_under_caret, &ctx.sema) |
117 | .zip(Some(path_under_caret.syntax().clone())) | 119 | .zip(Some(path_under_caret.syntax().clone())) |