aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r--crates/ra_hir/src/ty.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index 5d5bde305..7203a8a10 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -1003,8 +1003,13 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1003 /// otherwise, return ty. 1003 /// otherwise, return ty.
1004 fn resolve_ty_shallow<'b>(&mut self, ty: &'b Ty) -> Cow<'b, Ty> { 1004 fn resolve_ty_shallow<'b>(&mut self, ty: &'b Ty) -> Cow<'b, Ty> {
1005 let mut ty = Cow::Borrowed(ty); 1005 let mut ty = Cow::Borrowed(ty);
1006 for _ in 0..3 { 1006 // The type variable could resolve to a int/float variable. Hence try
1007 // the type variable could resolve to a int/float variable 1007 // resolving up to three times; each type of variable shouldn't occur
1008 // more than once
1009 for i in 0..3 {
1010 if i > 0 {
1011 tested_by!(type_var_resolves_to_int_var);
1012 }
1008 match &*ty { 1013 match &*ty {
1009 Ty::Infer(tv) => { 1014 Ty::Infer(tv) => {
1010 let inner = tv.to_inner(); 1015 let inner = tv.to_inner();
@@ -1019,6 +1024,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1019 _ => return ty, 1024 _ => return ty,
1020 } 1025 }
1021 } 1026 }
1027 log::error!("Inference variable still not resolved: {:?}", ty);
1022 ty 1028 ty
1023 } 1029 }
1024 1030