aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-08-25 18:28:32 +0100
committerFlorian Diebold <[email protected]>2019-09-02 13:56:38 +0100
commita7858bb7bf0a784d56b2b9ef97785a4fa78f7853 (patch)
treeffc29db397d35b9cfa55d2418db996dbf22e4995 /crates/ra_hir/src
parent6ecb36740a81445cf103577c3f9e9e6f831d0a1b (diff)
Report type mismatches in analysis-stats
Only the number usually; each one individually when running with -v.
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/code_model.rs2
-rw-r--r--crates/ra_hir/src/expr.rs12
2 files changed, 7 insertions, 7 deletions
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 {
617 self.data(db).name.clone() 617 self.data(db).name.clone()
618 } 618 }
619 619
620 pub(crate) fn body_source_map(self, db: &impl HirDatabase) -> Arc<BodySourceMap> { 620 pub fn body_source_map(self, db: &impl HirDatabase) -> Arc<BodySourceMap> {
621 db.body_with_source_map(self.into()).1 621 db.body_with_source_map(self.into()).1
622 } 622 }
623 623
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<PatId> for Body {
128} 128}
129 129
130impl BodySourceMap { 130impl BodySourceMap {
131 pub(crate) fn expr_syntax(&self, expr: ExprId) -> Option<SyntaxNodePtr> { 131 pub fn expr_syntax(&self, expr: ExprId) -> Option<SyntaxNodePtr> {
132 self.expr_map_back.get(expr).cloned() 132 self.expr_map_back.get(expr).cloned()
133 } 133 }
134 134
135 pub(crate) fn syntax_expr(&self, ptr: SyntaxNodePtr) -> Option<ExprId> { 135 pub fn syntax_expr(&self, ptr: SyntaxNodePtr) -> Option<ExprId> {
136 self.expr_map.get(&ptr).cloned() 136 self.expr_map.get(&ptr).cloned()
137 } 137 }
138 138
139 pub(crate) fn node_expr(&self, node: &ast::Expr) -> Option<ExprId> { 139 pub fn node_expr(&self, node: &ast::Expr) -> Option<ExprId> {
140 self.expr_map.get(&SyntaxNodePtr::new(node.syntax())).cloned() 140 self.expr_map.get(&SyntaxNodePtr::new(node.syntax())).cloned()
141 } 141 }
142 142
143 pub(crate) fn pat_syntax(&self, pat: PatId) -> Option<PatPtr> { 143 pub fn pat_syntax(&self, pat: PatId) -> Option<PatPtr> {
144 self.pat_map_back.get(pat).cloned() 144 self.pat_map_back.get(pat).cloned()
145 } 145 }
146 146
147 pub(crate) fn node_pat(&self, node: &ast::Pat) -> Option<PatId> { 147 pub fn node_pat(&self, node: &ast::Pat) -> Option<PatId> {
148 self.pat_map.get(&Either::A(AstPtr::new(node))).cloned() 148 self.pat_map.get(&Either::A(AstPtr::new(node))).cloned()
149 } 149 }
150 150
151 pub(crate) fn field_syntax(&self, expr: ExprId, field: usize) -> AstPtr<ast::RecordField> { 151 pub fn field_syntax(&self, expr: ExprId, field: usize) -> AstPtr<ast::RecordField> {
152 self.field_map[&(expr, field)] 152 self.field_map[&(expr, field)]
153 } 153 }
154} 154}