aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r--crates/ra_hir_ty/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index 302bb8aa2..13c5e6c6b 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -763,8 +763,8 @@ pub trait TypeWalk {
763 Self: Sized, 763 Self: Sized,
764 { 764 {
765 self.walk_mut_binders( 765 self.walk_mut_binders(
766 &mut |ty, binders| match ty { 766 &mut |ty, binders| {
767 &mut Ty::Bound(idx) => { 767 if let &mut Ty::Bound(idx) = ty {
768 if idx as usize >= binders && (idx as usize - binders) < substs.len() { 768 if idx as usize >= binders && (idx as usize - binders) < substs.len() {
769 *ty = substs.0[idx as usize - binders].clone(); 769 *ty = substs.0[idx as usize - binders].clone();
770 } else if idx as usize >= binders + substs.len() { 770 } else if idx as usize >= binders + substs.len() {
@@ -772,7 +772,6 @@ pub trait TypeWalk {
772 *ty = Ty::Bound(idx - substs.len() as u32); 772 *ty = Ty::Bound(idx - substs.len() as u32);
773 } 773 }
774 } 774 }
775 _ => {}
776 }, 775 },
777 0, 776 0,
778 ); 777 );