diff options
Diffstat (limited to 'crates/completion/src/lib.rs')
-rw-r--r-- | crates/completion/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/completion/src/lib.rs b/crates/completion/src/lib.rs index ee1b822e7..56ec13e8c 100644 --- a/crates/completion/src/lib.rs +++ b/crates/completion/src/lib.rs | |||
@@ -139,6 +139,7 @@ pub fn resolve_completion_edits( | |||
139 | position: FilePosition, | 139 | position: FilePosition, |
140 | full_import_path: &str, | 140 | full_import_path: &str, |
141 | imported_name: String, | 141 | imported_name: String, |
142 | import_for_trait_assoc_item: bool, | ||
142 | ) -> Option<Vec<TextEdit>> { | 143 | ) -> Option<Vec<TextEdit>> { |
143 | let ctx = CompletionContext::new(db, position, config)?; | 144 | let ctx = CompletionContext::new(db, position, config)?; |
144 | let anchor = ctx.name_ref_syntax.as_ref()?; | 145 | let anchor = ctx.name_ref_syntax.as_ref()?; |
@@ -154,7 +155,7 @@ pub fn resolve_completion_edits( | |||
154 | }) | 155 | }) |
155 | .find(|mod_path| mod_path.to_string() == full_import_path)?; | 156 | .find(|mod_path| mod_path.to_string() == full_import_path)?; |
156 | 157 | ||
157 | ImportEdit { import_path, import_scope } | 158 | ImportEdit { import_path, import_scope, import_for_trait_assoc_item } |
158 | .to_text_edit(config.insert_use.merge) | 159 | .to_text_edit(config.insert_use.merge) |
159 | .map(|edit| vec![edit]) | 160 | .map(|edit| vec![edit]) |
160 | } | 161 | } |