aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/walk.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/walk.rs')
-rw-r--r--crates/hir_ty/src/walk.rs19
1 files changed, 17 insertions, 2 deletions
diff --git a/crates/hir_ty/src/walk.rs b/crates/hir_ty/src/walk.rs
index b85e6ab4d..963eb12c8 100644
--- a/crates/hir_ty/src/walk.rs
+++ b/crates/hir_ty/src/walk.rs
@@ -6,8 +6,9 @@ use std::mem;
6use chalk_ir::DebruijnIndex; 6use chalk_ir::DebruijnIndex;
7 7
8use crate::{ 8use crate::{
9 utils::make_mut_slice, AliasEq, AliasTy, Binders, CallableSig, GenericArg, GenericArgData, 9 utils::make_mut_slice, AliasEq, AliasTy, Binders, CallableSig, FnSubst, GenericArg,
10 Interner, OpaqueTy, ProjectionTy, Substitution, TraitRef, Ty, TyKind, WhereClause, 10 GenericArgData, Interner, OpaqueTy, ProjectionTy, Substitution, TraitRef, Ty, TyKind,
11 WhereClause,
11}; 12};
12 13
13/// This allows walking structures that contain types to do something with those 14/// This allows walking structures that contain types to do something with those
@@ -381,3 +382,17 @@ impl TypeWalk for AliasEq {
381 } 382 }
382 } 383 }
383} 384}
385
386impl TypeWalk for FnSubst {
387 fn walk(&self, f: &mut impl FnMut(&Ty)) {
388 self.0.walk(f)
389 }
390
391 fn walk_mut_binders(
392 &mut self,
393 f: &mut impl FnMut(&mut Ty, DebruijnIndex),
394 binders: DebruijnIndex,
395 ) {
396 self.0.walk_mut_binders(f, binders)
397 }
398}