aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index cfc4bd326..9e5ce5508 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -216,6 +216,11 @@ impl SourceAnalyzer {
216 self.infer.as_ref()?.field_resolution(expr_id) 216 self.infer.as_ref()?.field_resolution(expr_id)
217 } 217 }
218 218
219 pub fn resolve_record_field(&self, field: &ast::RecordField) -> Option<crate::StructField> {
220 let expr_id = self.expr_id(&field.expr()?)?;
221 self.infer.as_ref()?.record_field_resolution(expr_id)
222 }
223
219 pub fn resolve_record_literal(&self, record_lit: &ast::RecordLit) -> Option<crate::VariantDef> { 224 pub fn resolve_record_literal(&self, record_lit: &ast::RecordLit) -> Option<crate::VariantDef> {
220 let expr_id = self.expr_id(&record_lit.clone().into())?; 225 let expr_id = self.expr_id(&record_lit.clone().into())?;
221 self.infer.as_ref()?.variant_resolution_for_expr(expr_id) 226 self.infer.as_ref()?.variant_resolution_for_expr(expr_id)