diff options
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index c85e38a0d..05f5bca57 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -229,12 +229,12 @@ impl SourceAnalyzer { | |||
229 | 229 | ||
230 | pub fn resolve_record_literal(&self, record_lit: &ast::RecordLit) -> Option<crate::VariantDef> { | 230 | pub fn resolve_record_literal(&self, record_lit: &ast::RecordLit) -> Option<crate::VariantDef> { |
231 | let expr_id = self.expr_id(&record_lit.clone().into())?; | 231 | let expr_id = self.expr_id(&record_lit.clone().into())?; |
232 | self.infer.as_ref()?.variant_resolution_for_expr(expr_id) | 232 | self.infer.as_ref()?.variant_resolution_for_expr(expr_id).map(|it| it.into()) |
233 | } | 233 | } |
234 | 234 | ||
235 | pub fn resolve_record_pattern(&self, record_pat: &ast::RecordPat) -> Option<crate::VariantDef> { | 235 | pub fn resolve_record_pattern(&self, record_pat: &ast::RecordPat) -> Option<crate::VariantDef> { |
236 | let pat_id = self.pat_id(&record_pat.clone().into())?; | 236 | let pat_id = self.pat_id(&record_pat.clone().into())?; |
237 | self.infer.as_ref()?.variant_resolution_for_pat(pat_id) | 237 | self.infer.as_ref()?.variant_resolution_for_pat(pat_id).map(|it| it.into()) |
238 | } | 238 | } |
239 | 239 | ||
240 | pub fn resolve_macro_call( | 240 | pub fn resolve_macro_call( |