aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/walk.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-05 16:13:50 +0100
committerFlorian Diebold <[email protected]>2021-04-05 18:19:18 +0100
commit69714d36e6617800f3edea174f5d6f76c985ad4c (patch)
treee74b3e3ab442e4e2e36c3985de978ebbbccf7634 /crates/hir_ty/src/walk.rs
parent6e9798a992b30b735f14018379e0861d2ec30647 (diff)
Hide Binders internals more
Diffstat (limited to 'crates/hir_ty/src/walk.rs')
-rw-r--r--crates/hir_ty/src/walk.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_ty/src/walk.rs b/crates/hir_ty/src/walk.rs
index 5dfd59746..b1e22da0a 100644
--- a/crates/hir_ty/src/walk.rs
+++ b/crates/hir_ty/src/walk.rs
@@ -139,7 +139,7 @@ impl TypeWalk for Ty {
139 } 139 }
140 } 140 }
141 TyKind::Dyn(dyn_ty) => { 141 TyKind::Dyn(dyn_ty) => {
142 for p in dyn_ty.bounds.value.interned().iter() { 142 for p in dyn_ty.bounds.skip_binders().interned().iter() {
143 p.walk(f); 143 p.walk(f);
144 } 144 }
145 } 145 }
@@ -167,7 +167,7 @@ impl TypeWalk for Ty {
167 p_ty.substitution.walk_mut_binders(f, binders); 167 p_ty.substitution.walk_mut_binders(f, binders);
168 } 168 }
169 TyKind::Dyn(dyn_ty) => { 169 TyKind::Dyn(dyn_ty) => {
170 for p in make_mut_slice(dyn_ty.bounds.value.interned_mut()) { 170 for p in make_mut_slice(dyn_ty.bounds.skip_binders_mut().interned_mut()) {
171 p.walk_mut_binders(f, binders.shifted_in()); 171 p.walk_mut_binders(f, binders.shifted_in());
172 } 172 }
173 } 173 }
@@ -294,7 +294,7 @@ impl TypeWalk for Substitution {
294 294
295impl<T: TypeWalk> TypeWalk for Binders<T> { 295impl<T: TypeWalk> TypeWalk for Binders<T> {
296 fn walk(&self, f: &mut impl FnMut(&Ty)) { 296 fn walk(&self, f: &mut impl FnMut(&Ty)) {
297 self.value.walk(f); 297 self.skip_binders().walk(f);
298 } 298 }
299 299
300 fn walk_mut_binders( 300 fn walk_mut_binders(
@@ -302,7 +302,7 @@ impl<T: TypeWalk> TypeWalk for Binders<T> {
302 f: &mut impl FnMut(&mut Ty, DebruijnIndex), 302 f: &mut impl FnMut(&mut Ty, DebruijnIndex),
303 binders: DebruijnIndex, 303 binders: DebruijnIndex,
304 ) { 304 ) {
305 self.value.walk_mut_binders(f, binders.shifted_in()) 305 self.skip_binders_mut().walk_mut_binders(f, binders.shifted_in())
306 } 306 }
307} 307}
308 308