aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/add_missing_impl_members.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/add_missing_impl_members.rs')
-rw-r--r--crates/ra_assists/src/add_missing_impl_members.rs4
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 @@
1use crate::{Assist, AssistId, AssistCtx, ast_editor::{AstEditor, AstBuilder}}; 1use crate::{Assist, AssistId, AssistCtx, ast_editor::{AstEditor, AstBuilder}};
2 2
3use hir::db::HirDatabase; 3use hir::{HasSource, db::HirDatabase};
4use ra_syntax::{SmolStr, TreeArc}; 4use ra_syntax::{SmolStr, TreeArc};
5use ra_syntax::ast::{self, AstNode, FnDef, ImplItem, ImplItemKind, NameOwner}; 5use ra_syntax::ast::{self, AstNode, FnDef, ImplItem, ImplItemKind, NameOwner};
6use ra_db::FilePosition; 6use 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}