From 9c54537ecf4694d02f45c7ca0a3828c08c0a0efd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 10 Jul 2020 14:09:31 +0200 Subject: Rename --- crates/ra_hir/src/semantics.rs | 2 +- crates/ra_hir/src/source_analyzer.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'crates') 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> { } pub fn type_of_expr(&self, expr: &ast::Expr) -> Option { - self.analyze(expr.syntax()).type_of(self.db, &expr) + self.analyze(expr.syntax()).type_of_expr(self.db, &expr) } pub fn type_of_pat(&self, pat: &ast::Pat) -> Option { 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 { Some(res) } - // TODO: rename - pub(crate) fn type_of(&self, db: &dyn HirDatabase, expr: &ast::Expr) -> Option { + pub(crate) fn type_of_expr(&self, db: &dyn HirDatabase, expr: &ast::Expr) -> Option { let expr_id = self.expr_id(db, expr)?; let ty = self.infer.as_ref()?[expr_id].clone(); Type::new_with_resolver(db, &self.resolver, ty) -- cgit v1.2.3