aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/helpers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_db/src/helpers.rs')
-rw-r--r--crates/ide_db/src/helpers.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide_db/src/helpers.rs b/crates/ide_db/src/helpers.rs
index 66798ea3a..83a665b37 100644
--- a/crates/ide_db/src/helpers.rs
+++ b/crates/ide_db/src/helpers.rs
@@ -113,6 +113,10 @@ impl FamousDefs<'_, '_> {
113 self.find_module("core:iter") 113 self.find_module("core:iter")
114 } 114 }
115 115
116 pub fn core_ops_Deref(&self) -> Option<Trait> {
117 self.find_trait("core:ops:Deref")
118 }
119
116 fn find_trait(&self, path: &str) -> Option<Trait> { 120 fn find_trait(&self, path: &str) -> Option<Trait> {
117 match self.find_def(path)? { 121 match self.find_def(path)? {
118 hir::ScopeDef::ModuleDef(hir::ModuleDef::Trait(it)) => Some(it), 122 hir::ScopeDef::ModuleDef(hir::ModuleDef::Trait(it)) => Some(it),