From 17680f6060be1abe8f021538aeff0a95e9c569da Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 27 Nov 2019 16:02:33 +0300 Subject: More decoupling --- crates/ra_hir/src/source_binder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/source_binder.rs') diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 0de36abd1..c85e38a0d 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs @@ -168,7 +168,7 @@ impl SourceAnalyzer { resolver, body_owner: Some(def), body_source_map: Some(source_map), - infer: Some(db.infer(def)), + infer: Some(db.infer(def.into())), scopes: Some(scopes), file_id: node.file_id, } @@ -297,13 +297,13 @@ impl SourceAnalyzer { if let Some(path_expr) = path.syntax().parent().and_then(ast::PathExpr::cast) { let expr_id = self.expr_id(&path_expr.into())?; if let Some(assoc) = self.infer.as_ref()?.assoc_resolutions_for_expr(expr_id) { - return Some(PathResolution::AssocItem(assoc)); + return Some(PathResolution::AssocItem(assoc.into())); } } if let Some(path_pat) = path.syntax().parent().and_then(ast::PathPat::cast) { let pat_id = self.pat_id(&path_pat.into())?; if let Some(assoc) = self.infer.as_ref()?.assoc_resolutions_for_pat(pat_id) { - return Some(PathResolution::AssocItem(assoc)); + return Some(PathResolution::AssocItem(assoc.into())); } } // This must be a normal source file rather than macro file. -- cgit v1.2.3