diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 8 |
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; |