aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r--crates/ide_db/src/helpers/import_assets.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ide_db/src/helpers/import_assets.rs b/crates/ide_db/src/helpers/import_assets.rs
index e03ccd351..7c8844e95 100644
--- a/crates/ide_db/src/helpers/import_assets.rs
+++ b/crates/ide_db/src/helpers/import_assets.rs
@@ -304,7 +304,11 @@ fn path_applicable_imports(
304 return items_with_candidate_name 304 return items_with_candidate_name
305 .into_iter() 305 .into_iter()
306 .filter_map(|item| { 306 .filter_map(|item| {
307 Some(LocatedImport::new(mod_path(item)?, item, item, mod_path(item))) 307 let mut mod_path = mod_path(item)?;
308 if let Some(assoc_item) = item_as_assoc(db, item) {
309 mod_path.push_segment(assoc_item.name(db)?);
310 }
311 Some(LocatedImport::new(mod_path.clone(), item, item, Some(mod_path)))
308 }) 312 })
309 .collect(); 313 .collect();
310 } 314 }