aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-27 13:02:33 +0000
committerAleksey Kladov <[email protected]>2019-11-27 13:02:33 +0000
commit17680f6060be1abe8f021538aeff0a95e9c569da (patch)
tree707e3d2946429cdbe0c4536befcf9faef86ea572 /crates/ra_hir/src/source_binder.rs
parentd569869f7a8c7a4c23b14fadbef63d4dbc949bcd (diff)
More decoupling
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs6
1 files changed, 3 insertions, 3 deletions
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 {
168 resolver, 168 resolver,
169 body_owner: Some(def), 169 body_owner: Some(def),
170 body_source_map: Some(source_map), 170 body_source_map: Some(source_map),
171 infer: Some(db.infer(def)), 171 infer: Some(db.infer(def.into())),
172 scopes: Some(scopes), 172 scopes: Some(scopes),
173 file_id: node.file_id, 173 file_id: node.file_id,
174 } 174 }
@@ -297,13 +297,13 @@ impl SourceAnalyzer {
297 if let Some(path_expr) = path.syntax().parent().and_then(ast::PathExpr::cast) { 297 if let Some(path_expr) = path.syntax().parent().and_then(ast::PathExpr::cast) {
298 let expr_id = self.expr_id(&path_expr.into())?; 298 let expr_id = self.expr_id(&path_expr.into())?;
299 if let Some(assoc) = self.infer.as_ref()?.assoc_resolutions_for_expr(expr_id) { 299 if let Some(assoc) = self.infer.as_ref()?.assoc_resolutions_for_expr(expr_id) {
300 return Some(PathResolution::AssocItem(assoc)); 300 return Some(PathResolution::AssocItem(assoc.into()));
301 } 301 }
302 } 302 }
303 if let Some(path_pat) = path.syntax().parent().and_then(ast::PathPat::cast) { 303 if let Some(path_pat) = path.syntax().parent().and_then(ast::PathPat::cast) {
304 let pat_id = self.pat_id(&path_pat.into())?; 304 let pat_id = self.pat_id(&path_pat.into())?;
305 if let Some(assoc) = self.infer.as_ref()?.assoc_resolutions_for_pat(pat_id) { 305 if let Some(assoc) = self.infer.as_ref()?.assoc_resolutions_for_pat(pat_id) {
306 return Some(PathResolution::AssocItem(assoc)); 306 return Some(PathResolution::AssocItem(assoc.into()));
307 } 307 }
308 } 308 }
309 // This must be a normal source file rather than macro file. 309 // This must be a normal source file rather than macro file.