aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/semantics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/semantics.rs')
-rw-r--r--crates/ra_hir/src/semantics.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs
index c3d8ee1ae..154adedb3 100644
--- a/crates/ra_hir/src/semantics.rs
+++ b/crates/ra_hir/src/semantics.rs
@@ -18,8 +18,8 @@ use crate::{
18 db::HirDatabase, 18 db::HirDatabase,
19 source_analyzer::{resolve_hir_path, ReferenceDescriptor, SourceAnalyzer}, 19 source_analyzer::{resolve_hir_path, ReferenceDescriptor, SourceAnalyzer},
20 source_binder::{ChildContainer, SourceBinder}, 20 source_binder::{ChildContainer, SourceBinder},
21 Function, HirFileId, InFile, Local, MacroDef, Module, Name, Origin, Path, PathResolution, 21 Function, HirFileId, InFile, Local, MacroDef, Module, ModuleDef, Name, Origin, Path,
22 ScopeDef, StructField, Trait, Type, TypeParam, VariantDef, 22 PathResolution, ScopeDef, StructField, Trait, Type, TypeParam, VariantDef,
23}; 23};
24use ra_prof::profile; 24use ra_prof::profile;
25 25
@@ -129,6 +129,10 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
129 self.analyze(path.syntax()).resolve_path(self.db, path) 129 self.analyze(path.syntax()).resolve_path(self.db, path)
130 } 130 }
131 131
132 pub fn resolve_bind_pat_to_const(&self, pat: &ast::BindPat) -> Option<ModuleDef> {
133 self.analyze(pat.syntax()).resolve_bind_pat_to_const(self.db, pat)
134 }
135
132 // FIXME: use this instead? 136 // FIXME: use this instead?
133 // pub fn resolve_name_ref(&self, name_ref: &ast::NameRef) -> Option<???>; 137 // pub fn resolve_name_ref(&self, name_ref: &ast::NameRef) -> Option<???>;
134 138