diff options
author | Aleksey Kladov <[email protected]> | 2020-07-10 13:09:31 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-10 13:09:31 +0100 |
commit | 9c54537ecf4694d02f45c7ca0a3828c08c0a0efd (patch) | |
tree | 53b289620281b033c6057573382bfd9856847c1f /crates | |
parent | b85042601d69d1c592b731430ef0e445c39fda56 (diff) |
Rename
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 6b6c5e494..4677eb561 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -375,7 +375,7 @@ impl<'db> SemanticsImpl<'db> { | |||
375 | } | 375 | } |
376 | 376 | ||
377 | pub fn type_of_expr(&self, expr: &ast::Expr) -> Option<Type> { | 377 | pub fn type_of_expr(&self, expr: &ast::Expr) -> Option<Type> { |
378 | self.analyze(expr.syntax()).type_of(self.db, &expr) | 378 | self.analyze(expr.syntax()).type_of_expr(self.db, &expr) |
379 | } | 379 | } |
380 | 380 | ||
381 | pub fn type_of_pat(&self, pat: &ast::Pat) -> Option<Type> { | 381 | pub fn type_of_pat(&self, pat: &ast::Pat) -> Option<Type> { |
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs index 1f1bdc0d8..f74b78b23 100644 --- a/crates/ra_hir/src/source_analyzer.rs +++ b/crates/ra_hir/src/source_analyzer.rs | |||
@@ -115,8 +115,7 @@ impl SourceAnalyzer { | |||
115 | Some(res) | 115 | Some(res) |
116 | } | 116 | } |
117 | 117 | ||
118 | // TODO: rename | 118 | pub(crate) fn type_of_expr(&self, db: &dyn HirDatabase, expr: &ast::Expr) -> Option<Type> { |
119 | pub(crate) fn type_of(&self, db: &dyn HirDatabase, expr: &ast::Expr) -> Option<Type> { | ||
120 | let expr_id = self.expr_id(db, expr)?; | 119 | let expr_id = self.expr_id(db, expr)?; |
121 | let ty = self.infer.as_ref()?[expr_id].clone(); | 120 | let ty = self.infer.as_ref()?[expr_id].clone(); |
122 | Type::new_with_resolver(db, &self.resolver, ty) | 121 | Type::new_with_resolver(db, &self.resolver, ty) |