diff options
Diffstat (limited to 'crates/ra_assists/src/add_missing_impl_members.rs')
-rw-r--r-- | crates/ra_assists/src/add_missing_impl_members.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/add_missing_impl_members.rs b/crates/ra_assists/src/add_missing_impl_members.rs index 23c01e747..0e49b0401 100644 --- a/crates/ra_assists/src/add_missing_impl_members.rs +++ b/crates/ra_assists/src/add_missing_impl_members.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use crate::{Assist, AssistId, AssistCtx, ast_editor::{AstEditor, AstBuilder}}; | 1 | use crate::{Assist, AssistId, AssistCtx, ast_editor::{AstEditor, AstBuilder}}; |
2 | 2 | ||
3 | use hir::db::HirDatabase; | 3 | use hir::{HasSource, db::HirDatabase}; |
4 | use ra_syntax::{SmolStr, TreeArc}; | 4 | use ra_syntax::{SmolStr, TreeArc}; |
5 | use ra_syntax::ast::{self, AstNode, FnDef, ImplItem, ImplItemKind, NameOwner}; | 5 | use ra_syntax::ast::{self, AstNode, FnDef, ImplItem, ImplItemKind, NameOwner}; |
6 | use ra_db::FilePosition; | 6 | use ra_db::FilePosition; |
@@ -110,7 +110,7 @@ fn resolve_target_trait_def( | |||
110 | impl_block.target_trait().map(AstNode::syntax).and_then(ast::PathType::cast)?.path()?; | 110 | impl_block.target_trait().map(AstNode::syntax).and_then(ast::PathType::cast)?.path()?; |
111 | 111 | ||
112 | match analyzer.resolve_path(db, &ast_path) { | 112 | match analyzer.resolve_path(db, &ast_path) { |
113 | Some(hir::PathResolution::Def(hir::ModuleDef::Trait(def))) => Some(def.source(db).1), | 113 | Some(hir::PathResolution::Def(hir::ModuleDef::Trait(def))) => Some(def.source(db).ast), |
114 | _ => None, | 114 | _ => None, |
115 | } | 115 | } |
116 | } | 116 | } |