aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/infer
diff options
context:
space:
mode:
authorJeremy Kolb <[email protected]>2019-07-04 18:26:44 +0100
committerJeremy Kolb <[email protected]>2019-07-04 22:43:00 +0100
commit4ad9e986ad05e404df73701c098b71f73a847ca6 (patch)
tree2a2b2cc9dbee07d0aa92df883c807edbab264a85 /crates/ra_hir/src/ty/infer
parentc6a6e43372de9530ec7df0f38352466ed107e1a2 (diff)
Some clippy fixes for 1.36
Diffstat (limited to 'crates/ra_hir/src/ty/infer')
-rw-r--r--crates/ra_hir/src/ty/infer/unify.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer/unify.rs b/crates/ra_hir/src/ty/infer/unify.rs
index 04633bdb2..49bf5b946 100644
--- a/crates/ra_hir/src/ty/infer/unify.rs
+++ b/crates/ra_hir/src/ty/infer/unify.rs
@@ -102,7 +102,7 @@ impl<T> Canonicalized<T> {
102 ty.fold(&mut |ty| match ty { 102 ty.fold(&mut |ty| match ty {
103 Ty::Bound(idx) => { 103 Ty::Bound(idx) => {
104 if (idx as usize) < self.free_vars.len() { 104 if (idx as usize) < self.free_vars.len() {
105 Ty::Infer(self.free_vars[idx as usize].clone()) 105 Ty::Infer(self.free_vars[idx as usize])
106 } else { 106 } else {
107 Ty::Bound(idx) 107 Ty::Bound(idx)
108 } 108 }
@@ -120,7 +120,7 @@ impl<T> Canonicalized<T> {
120 let new_vars = 120 let new_vars =
121 (0..solution.num_vars).map(|_| ctx.new_type_var()).collect::<Vec<_>>().into(); 121 (0..solution.num_vars).map(|_| ctx.new_type_var()).collect::<Vec<_>>().into();
122 for (i, ty) in solution.value.into_iter().enumerate() { 122 for (i, ty) in solution.value.into_iter().enumerate() {
123 let var = self.free_vars[i].clone(); 123 let var = self.free_vars[i];
124 ctx.unify(&Ty::Infer(var), &ty.subst_bound_vars(&new_vars)); 124 ctx.unify(&Ty::Infer(var), &ty.subst_bound_vars(&new_vars));
125 } 125 }
126 } 126 }