aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index caa22dace..86b36c565 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -53,7 +53,7 @@ use hir_def::{
53use hir_expand::{diagnostics::DiagnosticSink, name::name, MacroDefKind}; 53use hir_expand::{diagnostics::DiagnosticSink, name::name, MacroDefKind};
54use hir_ty::{ 54use hir_ty::{
55 autoderef, could_unify, 55 autoderef, could_unify,
56 method_resolution::{self, TyFingerprint}, 56 method_resolution::{self, def_crates, TyFingerprint},
57 primitive::UintTy, 57 primitive::UintTy,
58 subst_prefix, 58 subst_prefix,
59 traits::FnTrait, 59 traits::FnTrait,
@@ -1568,7 +1568,7 @@ impl Impl {
1568 } 1568 }
1569 1569
1570 pub fn all_for_type(db: &dyn HirDatabase, Type { krate, ty, .. }: Type) -> Vec<Impl> { 1570 pub fn all_for_type(db: &dyn HirDatabase, Type { krate, ty, .. }: Type) -> Vec<Impl> {
1571 let def_crates = match ty.def_crates(db, krate) { 1571 let def_crates = match def_crates(db, &ty, krate) {
1572 Some(def_crates) => def_crates, 1572 Some(def_crates) => def_crates,
1573 None => return Vec::new(), 1573 None => return Vec::new(),
1574 }; 1574 };
@@ -1955,7 +1955,7 @@ impl Type {
1955 krate: Crate, 1955 krate: Crate,
1956 mut callback: impl FnMut(AssocItem) -> Option<T>, 1956 mut callback: impl FnMut(AssocItem) -> Option<T>,
1957 ) -> Option<T> { 1957 ) -> Option<T> {
1958 for krate in self.ty.def_crates(db, krate.id)? { 1958 for krate in def_crates(db, &self.ty, krate.id)? {
1959 let impls = db.inherent_impls_in_crate(krate); 1959 let impls = db.inherent_impls_in_crate(krate);
1960 1960
1961 for impl_def in impls.for_self_ty(&self.ty) { 1961 for impl_def in impls.for_self_ty(&self.ty) {