diff options
Diffstat (limited to 'crates/ra_hir_ty/src/traits.rs')
-rw-r--r-- | crates/ra_hir_ty/src/traits.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/traits.rs b/crates/ra_hir_ty/src/traits.rs index 80eae4eca..07854a062 100644 --- a/crates/ra_hir_ty/src/traits.rs +++ b/crates/ra_hir_ty/src/traits.rs | |||
@@ -7,7 +7,7 @@ use ra_db::{impl_intern_key, salsa, CrateId}; | |||
7 | use ra_prof::profile; | 7 | use ra_prof::profile; |
8 | use rustc_hash::FxHashSet; | 8 | use rustc_hash::FxHashSet; |
9 | 9 | ||
10 | use crate::db::HirDatabase; | 10 | use crate::{db::HirDatabase, DebruijnIndex}; |
11 | 11 | ||
12 | use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; | 12 | use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; |
13 | 13 | ||
@@ -128,7 +128,11 @@ impl TypeWalk for ProjectionPredicate { | |||
128 | self.ty.walk(f); | 128 | self.ty.walk(f); |
129 | } | 129 | } |
130 | 130 | ||
131 | fn walk_mut_binders(&mut self, f: &mut impl FnMut(&mut Ty, usize), binders: usize) { | 131 | fn walk_mut_binders( |
132 | &mut self, | ||
133 | f: &mut impl FnMut(&mut Ty, DebruijnIndex), | ||
134 | binders: DebruijnIndex, | ||
135 | ) { | ||
132 | self.projection_ty.walk_mut_binders(f, binders); | 136 | self.projection_ty.walk_mut_binders(f, binders); |
133 | self.ty.walk_mut_binders(f, binders); | 137 | self.ty.walk_mut_binders(f, binders); |
134 | } | 138 | } |
@@ -144,7 +148,7 @@ pub(crate) fn trait_solve_query( | |||
144 | Obligation::Trait(it) => db.trait_data(it.trait_).name.to_string(), | 148 | Obligation::Trait(it) => db.trait_data(it.trait_).name.to_string(), |
145 | Obligation::Projection(_) => "projection".to_string(), | 149 | Obligation::Projection(_) => "projection".to_string(), |
146 | }); | 150 | }); |
147 | log::debug!("trait_solve_query({})", goal.value.value.display(db)); | 151 | eprintln!("trait_solve_query({})", goal.value.value.display(db)); |
148 | 152 | ||
149 | if let Obligation::Projection(pred) = &goal.value.value { | 153 | if let Obligation::Projection(pred) = &goal.value.value { |
150 | if let Ty::Bound(_) = &pred.projection_ty.parameters[0] { | 154 | if let Ty::Bound(_) = &pred.projection_ty.parameters[0] { |