diff options
Diffstat (limited to 'crates/ra_hir/src/ty/traits.rs')
-rw-r--r-- | crates/ra_hir/src/ty/traits.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs index 4f1eab150..771525deb 100644 --- a/crates/ra_hir/src/ty/traits.rs +++ b/crates/ra_hir/src/ty/traits.rs | |||
@@ -8,7 +8,7 @@ use ra_prof::profile; | |||
8 | use rustc_hash::FxHashSet; | 8 | use rustc_hash::FxHashSet; |
9 | 9 | ||
10 | use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; | 10 | use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; |
11 | use crate::{db::HirDatabase, expr::ExprId, Crate, DefWithBody, ImplBlock, Trait}; | 11 | use crate::{db::HirDatabase, expr::ExprId, Crate, DefWithBody, ImplBlock, Trait, TypeAlias}; |
12 | 12 | ||
13 | use self::chalk::{from_chalk, ToChalk}; | 13 | use self::chalk::{from_chalk, ToChalk}; |
14 | 14 | ||
@@ -300,3 +300,14 @@ pub enum Impl { | |||
300 | /// Closure types implement the Fn traits synthetically. | 300 | /// Closure types implement the Fn traits synthetically. |
301 | ClosureFnTraitImpl(ClosureFnTraitImplData), | 301 | ClosureFnTraitImpl(ClosureFnTraitImplData), |
302 | } | 302 | } |
303 | |||
304 | /// An associated type value. Usually this comes from a `type` declaration | ||
305 | /// inside an impl block, but for built-in impls we have to synthesize it. | ||
306 | /// (We only need this because Chalk wants a unique ID for each of these.) | ||
307 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
308 | pub enum AssocTyValue { | ||
309 | /// A normal assoc type value from an impl block. | ||
310 | TypeAlias(TypeAlias), | ||
311 | /// The output type of the Fn trait implementation. | ||
312 | ClosureFnTraitImplOutput(ClosureFnTraitImplData), | ||
313 | } | ||