diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-10 08:50:57 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-10 08:50:57 +0100 |
commit | 37eb12f2dd6f36570a27b4e4aaf9048860b5a06b (patch) | |
tree | f5640991cbf0db2bfdad29b911435827cadfb4a8 /crates/ra_hir/src/ty | |
parent | b863272899a1bae63c7d9411d0ebff74652bae8e (diff) | |
parent | 10726fdb65fda9144a5f9201272d065a268fc1b7 (diff) |
Merge #1128
1128: A touch of type-safety r=matklad a=matklad
Note that we intentionally don't use `Either` from crates.io: I like A/B naming more then left/rigth, I feel like we might need Either3 with C at some point, and I'd love the ability to write inherent impls
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index f6a325033..ecc63f376 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -2324,7 +2324,7 @@ fn infer(content: &str) -> String { | |||
2324 | 2324 | ||
2325 | for (pat, ty) in inference_result.type_of_pat.iter() { | 2325 | for (pat, ty) in inference_result.type_of_pat.iter() { |
2326 | let syntax_ptr = match body_source_map.pat_syntax(pat) { | 2326 | let syntax_ptr = match body_source_map.pat_syntax(pat) { |
2327 | Some(sp) => sp, | 2327 | Some(sp) => sp.either(|it| it.syntax_node_ptr(), |it| it.syntax_node_ptr()), |
2328 | None => continue, | 2328 | None => continue, |
2329 | }; | 2329 | }; |
2330 | types.push((syntax_ptr, ty)); | 2330 | types.push((syntax_ptr, ty)); |