diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-07 12:18:20 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-07 12:18:20 +0100 |
commit | 45510ae23da9090027a80c4ff88dc8e7d9f29dbb (patch) | |
tree | cb2e469e3a80aaf8dae2f4dbaf3a8bbfb538894f /crates/hir/src | |
parent | a8f1e41f0f15fee02a73850db559752a9124d014 (diff) | |
parent | c3c8e8225ff0a7a741f24777b5ee7a9c3e91eeb7 (diff) |
Merge #8396
8396: Uncouple Ty::builtin_deref and Ty::def_crates from Ty r=Veykril a=Veykril
bors r+
CC #8313
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir/src')
-rw-r--r-- | crates/hir/src/lib.rs | 6 |
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::{ | |||
53 | use hir_expand::{diagnostics::DiagnosticSink, name::name, MacroDefKind}; | 53 | use hir_expand::{diagnostics::DiagnosticSink, name::name, MacroDefKind}; |
54 | use hir_ty::{ | 54 | use 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) { |