From c3c8e8225ff0a7a741f24777b5ee7a9c3e91eeb7 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 7 Apr 2021 13:09:31 +0200 Subject: Free Ty::def_crates --- crates/hir/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir/src') 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::{ use hir_expand::{diagnostics::DiagnosticSink, name::name, MacroDefKind}; use hir_ty::{ autoderef, could_unify, - method_resolution::{self, TyFingerprint}, + method_resolution::{self, def_crates, TyFingerprint}, primitive::UintTy, subst_prefix, traits::FnTrait, @@ -1568,7 +1568,7 @@ impl Impl { } pub fn all_for_type(db: &dyn HirDatabase, Type { krate, ty, .. }: Type) -> Vec { - let def_crates = match ty.def_crates(db, krate) { + let def_crates = match def_crates(db, &ty, krate) { Some(def_crates) => def_crates, None => return Vec::new(), }; @@ -1955,7 +1955,7 @@ impl Type { krate: Crate, mut callback: impl FnMut(AssocItem) -> Option, ) -> Option { - for krate in self.ty.def_crates(db, krate.id)? { + for krate in def_crates(db, &self.ty, krate.id)? { let impls = db.inherent_impls_in_crate(krate); for impl_def in impls.for_self_ty(&self.ty) { -- cgit v1.2.3