Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/imports/import_assets.rs')
| -rw-r--r-- | crates/ide-db/src/imports/import_assets.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ide-db/src/imports/import_assets.rs b/crates/ide-db/src/imports/import_assets.rs index 9018552afb..e0501b5e44 100644 --- a/crates/ide-db/src/imports/import_assets.rs +++ b/crates/ide-db/src/imports/import_assets.rs @@ -314,7 +314,7 @@ pub struct LocatedImport { pub item_to_import: ItemInNs, /// The path import candidate, resolved. /// - /// Not necessary matches the import: + /// Not necessarily matches the import: /// For any associated constant from the trait, we try to access as `some::path::SomeStruct::ASSOC_` /// the original item is the associated constant, but the import has to be a trait that /// defines this constant. @@ -454,6 +454,7 @@ impl<'db> ImportAssets<'db> { |trait_to_import| { !scope_definitions .contains(&ScopeDef::ModuleDef(ModuleDef::Trait(trait_to_import))) + && !scope.can_use_trait_methods(trait_to_import) }, ), } |