From a7858bb7bf0a784d56b2b9ef97785a4fa78f7853 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 25 Aug 2019 19:28:32 +0200 Subject: Report type mismatches in analysis-stats Only the number usually; each one individually when running with -v. --- crates/ra_hir/src/code_model.rs | 2 +- crates/ra_hir/src/expr.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 66a58efed..0f9ff97f1 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -617,7 +617,7 @@ impl Function { self.data(db).name.clone() } - pub(crate) fn body_source_map(self, db: &impl HirDatabase) -> Arc { + pub fn body_source_map(self, db: &impl HirDatabase) -> Arc { db.body_with_source_map(self.into()).1 } diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 7cdc7555c..57225ae91 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs @@ -128,27 +128,27 @@ impl Index for Body { } impl BodySourceMap { - pub(crate) fn expr_syntax(&self, expr: ExprId) -> Option { + pub fn expr_syntax(&self, expr: ExprId) -> Option { self.expr_map_back.get(expr).cloned() } - pub(crate) fn syntax_expr(&self, ptr: SyntaxNodePtr) -> Option { + pub fn syntax_expr(&self, ptr: SyntaxNodePtr) -> Option { self.expr_map.get(&ptr).cloned() } - pub(crate) fn node_expr(&self, node: &ast::Expr) -> Option { + pub fn node_expr(&self, node: &ast::Expr) -> Option { self.expr_map.get(&SyntaxNodePtr::new(node.syntax())).cloned() } - pub(crate) fn pat_syntax(&self, pat: PatId) -> Option { + pub fn pat_syntax(&self, pat: PatId) -> Option { self.pat_map_back.get(pat).cloned() } - pub(crate) fn node_pat(&self, node: &ast::Pat) -> Option { + pub fn node_pat(&self, node: &ast::Pat) -> Option { self.pat_map.get(&Either::A(AstPtr::new(node))).cloned() } - pub(crate) fn field_syntax(&self, expr: ExprId, field: usize) -> AstPtr { + pub fn field_syntax(&self, expr: ExprId, field: usize) -> AstPtr { self.field_map[&(expr, field)] } } -- cgit v1.2.3