aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-01-06 22:57:39 +0000
committerFlorian Diebold <[email protected]>2019-01-06 23:05:19 +0000
commit71f7d82e45145281b9aec5bcdc694524864e552b (patch)
treedab214dd290cfb87c85b56b478a477eeaf4edc6e /crates/ra_hir/src/ty
parentcf49a11263c4d48720250db0c448b97dbec3d8b9 (diff)
Introduce ArenaMap
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/tests.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index 20fb783b8..030a20f1b 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -195,16 +195,16 @@ fn infer(content: &str) -> String {
195 let inference_result = func.infer(&db).unwrap(); 195 let inference_result = func.infer(&db).unwrap();
196 let body_syntax_mapping = func.body_syntax_mapping(&db).unwrap(); 196 let body_syntax_mapping = func.body_syntax_mapping(&db).unwrap();
197 let mut types = Vec::new(); 197 let mut types = Vec::new();
198 for (pat, ty) in &inference_result.type_of_pat { 198 for (pat, ty) in inference_result.type_of_pat.iter() {
199 let syntax_ptr = if let Some(sp) = body_syntax_mapping.pat_syntax(*pat) { 199 let syntax_ptr = if let Some(sp) = body_syntax_mapping.pat_syntax(pat) {
200 sp 200 sp
201 } else { 201 } else {
202 continue; 202 continue;
203 }; 203 };
204 types.push((syntax_ptr, ty)); 204 types.push((syntax_ptr, ty));
205 } 205 }
206 for (expr, ty) in &inference_result.type_of_expr { 206 for (expr, ty) in inference_result.type_of_expr.iter() {
207 let syntax_ptr = if let Some(sp) = body_syntax_mapping.expr_syntax(*expr) { 207 let syntax_ptr = if let Some(sp) = body_syntax_mapping.expr_syntax(expr) {
208 sp 208 sp
209 } else { 209 } else {
210 continue; 210 continue;