aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r--crates/ra_ide_db/src/defs.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs
index 1db60b87f..52233937c 100644
--- a/crates/ra_ide_db/src/defs.rs
+++ b/crates/ra_ide_db/src/defs.rs
@@ -126,6 +126,12 @@ fn classify_name_inner(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Opti
126 Some(name_ref_class.definition()) 126 Some(name_ref_class.definition())
127 }, 127 },
128 ast::BindPat(it) => { 128 ast::BindPat(it) => {
129 if let Some(record_field_pat) = it.syntax().parent().and_then(ast::RecordFieldPat::cast) {
130 return Some(Definition::Field(
131 sema.resolve_record_field_pat(&record_field_pat)?
132 ));
133 }
134
129 let local = sema.to_def(&it)?; 135 let local = sema.to_def(&it)?;
130 Some(Definition::Local(local)) 136 Some(Definition::Local(local))
131 }, 137 },