aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-18 21:40:12 +0000
committerGitHub <[email protected]>2021-03-18 21:40:12 +0000
commit86878443b1789cac0e48177f5f2b95ad0d6e912c (patch)
tree2b08daf4f82f058a8ed27d29853bee1ec3c761fe /crates/ide_db
parent48d6324a3f8a48efe3275424584a753c4e60d762 (diff)
parent34464ede3f57cbab4d6d1a67f36252cc22c02765 (diff)
Merge #8095
8095: Fix associated items not being appended to paths in import_assets r=SomeoneToIgnore a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide_db')
-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 }