diff options
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r-- | crates/ra_hir/src/ty.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index 3cbcbd1d0..bac21732e 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -17,12 +17,12 @@ use std::ops::Deref; | |||
17 | use std::sync::Arc; | 17 | use std::sync::Arc; |
18 | use std::{fmt, iter, mem}; | 18 | use std::{fmt, iter, mem}; |
19 | 19 | ||
20 | use hir_def::{generics::GenericParams, AdtId, GenericDefId}; | 20 | use hir_def::{generics::GenericParams, AdtId, DefWithBodyId, GenericDefId}; |
21 | use ra_db::{impl_intern_key, salsa}; | 21 | use ra_db::{impl_intern_key, salsa}; |
22 | 22 | ||
23 | use crate::{ | 23 | use crate::{ |
24 | db::HirDatabase, expr::ExprId, util::make_mut_slice, Adt, Crate, DefWithBody, FloatTy, IntTy, | 24 | db::HirDatabase, expr::ExprId, util::make_mut_slice, Adt, Crate, FloatTy, IntTy, Mutability, |
25 | Mutability, Name, Trait, TypeAlias, Uncertain, | 25 | Name, Trait, TypeAlias, Uncertain, |
26 | }; | 26 | }; |
27 | use display::{HirDisplay, HirFormatter}; | 27 | use display::{HirDisplay, HirFormatter}; |
28 | 28 | ||
@@ -113,7 +113,7 @@ pub enum TypeCtor { | |||
113 | /// | 113 | /// |
114 | /// The closure signature is stored in a `FnPtr` type in the first type | 114 | /// The closure signature is stored in a `FnPtr` type in the first type |
115 | /// parameter. | 115 | /// parameter. |
116 | Closure { def: DefWithBody, expr: ExprId }, | 116 | Closure { def: DefWithBodyId, expr: ExprId }, |
117 | } | 117 | } |
118 | 118 | ||
119 | /// This exists just for Chalk, because Chalk just has a single `StructId` where | 119 | /// This exists just for Chalk, because Chalk just has a single `StructId` where |
@@ -169,7 +169,8 @@ impl TypeCtor { | |||
169 | | TypeCtor::Ref(_) | 169 | | TypeCtor::Ref(_) |
170 | | TypeCtor::FnPtr { .. } | 170 | | TypeCtor::FnPtr { .. } |
171 | | TypeCtor::Tuple { .. } => None, | 171 | | TypeCtor::Tuple { .. } => None, |
172 | TypeCtor::Closure { def, .. } => def.krate(db), | 172 | // Closure's krate is irrelevant for coherence I would think? |
173 | TypeCtor::Closure { .. } => None, | ||
173 | TypeCtor::Adt(adt) => adt.krate(db), | 174 | TypeCtor::Adt(adt) => adt.krate(db), |
174 | TypeCtor::FnDef(callable) => Some(callable.krate(db).into()), | 175 | TypeCtor::FnDef(callable) => Some(callable.krate(db).into()), |
175 | TypeCtor::AssociatedType(type_alias) => type_alias.krate(db), | 176 | TypeCtor::AssociatedType(type_alias) => type_alias.krate(db), |