aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-31 19:09:09 +0100
committerAleksey Kladov <[email protected]>2020-07-31 19:12:10 +0100
commit98181087984157e27faba0b969e384f3c62c39d5 (patch)
tree0032223efeefca76340fb0a97f6f12d0e432a2a9 /crates/ra_ide_db
parent6791eb9685375da94556bb910ea71f78b08be5ec (diff)
Rename BindPat -> IdentPat
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r--crates/ra_ide_db/src/defs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs
index 6bf80a34c..66c048714 100644
--- a/crates/ra_ide_db/src/defs.rs
+++ b/crates/ra_ide_db/src/defs.rs
@@ -111,7 +111,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option
111 111
112 let parent = name.syntax().parent()?; 112 let parent = name.syntax().parent()?;
113 113
114 if let Some(bind_pat) = ast::BindPat::cast(parent.clone()) { 114 if let Some(bind_pat) = ast::IdentPat::cast(parent.clone()) {
115 if let Some(def) = sema.resolve_bind_pat_to_const(&bind_pat) { 115 if let Some(def) = sema.resolve_bind_pat_to_const(&bind_pat) {
116 return Some(NameClass::ConstReference(Definition::ModuleDef(def))); 116 return Some(NameClass::ConstReference(Definition::ModuleDef(def)));
117 } 117 }
@@ -128,7 +128,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option
128 128
129 Some(NameClass::Definition(name_ref_class.definition())) 129 Some(NameClass::Definition(name_ref_class.definition()))
130 }, 130 },
131 ast::BindPat(it) => { 131 ast::IdentPat(it) => {
132 let local = sema.to_def(&it)?; 132 let local = sema.to_def(&it)?;
133 133
134 if let Some(record_field_pat) = it.syntax().parent().and_then(ast::RecordPatField::cast) { 134 if let Some(record_field_pat) = it.syntax().parent().and_then(ast::RecordPatField::cast) {