diff options
Diffstat (limited to 'crates/ra_hir/src/ty/traits.rs')
-rw-r--r-- | crates/ra_hir/src/ty/traits.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs index 39b489a4c..93cb32869 100644 --- a/crates/ra_hir/src/ty/traits.rs +++ b/crates/ra_hir/src/ty/traits.rs | |||
@@ -2,13 +2,13 @@ | |||
2 | use std::sync::{Arc, Mutex}; | 2 | use std::sync::{Arc, Mutex}; |
3 | 3 | ||
4 | use chalk_ir::{cast::Cast, family::ChalkIr}; | 4 | use chalk_ir::{cast::Cast, family::ChalkIr}; |
5 | use hir_def::{expr::ExprId, DefWithBodyId, TraitId}; | 5 | use hir_def::{expr::ExprId, DefWithBodyId, ImplId, TraitId, TypeAliasId}; |
6 | use log::debug; | 6 | use log::debug; |
7 | use ra_db::{impl_intern_key, salsa, CrateId}; | 7 | use ra_db::{impl_intern_key, salsa, CrateId}; |
8 | use ra_prof::profile; | 8 | use ra_prof::profile; |
9 | use rustc_hash::FxHashSet; | 9 | use rustc_hash::FxHashSet; |
10 | 10 | ||
11 | use crate::{db::HirDatabase, ImplBlock, TypeAlias}; | 11 | use crate::{db::HirDatabase, ImplBlock}; |
12 | 12 | ||
13 | use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; | 13 | use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; |
14 | 14 | ||
@@ -79,7 +79,7 @@ pub(crate) fn impls_for_trait_query( | |||
79 | db: &impl HirDatabase, | 79 | db: &impl HirDatabase, |
80 | krate: CrateId, | 80 | krate: CrateId, |
81 | trait_: TraitId, | 81 | trait_: TraitId, |
82 | ) -> Arc<[ImplBlock]> { | 82 | ) -> Arc<[ImplId]> { |
83 | let mut impls = FxHashSet::default(); | 83 | let mut impls = FxHashSet::default(); |
84 | // We call the query recursively here. On the one hand, this means we can | 84 | // We call the query recursively here. On the one hand, this means we can |
85 | // reuse results from queries for different crates; on the other hand, this | 85 | // reuse results from queries for different crates; on the other hand, this |
@@ -90,7 +90,7 @@ pub(crate) fn impls_for_trait_query( | |||
90 | impls.extend(db.impls_for_trait(dep.crate_id, trait_).iter()); | 90 | impls.extend(db.impls_for_trait(dep.crate_id, trait_).iter()); |
91 | } | 91 | } |
92 | let crate_impl_blocks = db.impls_in_crate(krate); | 92 | let crate_impl_blocks = db.impls_in_crate(krate); |
93 | impls.extend(crate_impl_blocks.lookup_impl_blocks_for_trait(trait_).map(ImplBlock::from)); | 93 | impls.extend(crate_impl_blocks.lookup_impl_blocks_for_trait(trait_)); |
94 | impls.into_iter().collect() | 94 | impls.into_iter().collect() |
95 | } | 95 | } |
96 | 96 | ||
@@ -317,7 +317,7 @@ impl_intern_key!(GlobalImplId); | |||
317 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 317 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
318 | pub enum AssocTyValue { | 318 | pub enum AssocTyValue { |
319 | /// A normal assoc type value from an impl block. | 319 | /// A normal assoc type value from an impl block. |
320 | TypeAlias(TypeAlias), | 320 | TypeAlias(TypeAliasId), |
321 | /// The output type of the Fn trait implementation. | 321 | /// The output type of the Fn trait implementation. |
322 | ClosureFnTraitImplOutput(ClosureFnTraitImplData), | 322 | ClosureFnTraitImplOutput(ClosureFnTraitImplData), |
323 | } | 323 | } |