aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r--crates/ra_hir/src/ty/lower.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index b76929501..da3c8e94a 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -14,7 +14,7 @@ use hir_def::{
14 path::{GenericArg, PathSegment}, 14 path::{GenericArg, PathSegment},
15 resolver::{HasResolver, Resolver, TypeNs}, 15 resolver::{HasResolver, Resolver, TypeNs},
16 type_ref::{TypeBound, TypeRef}, 16 type_ref::{TypeBound, TypeRef},
17 AdtId, GenericDefId, LocalStructFieldId, VariantId, 17 AdtId, EnumVariantId, GenericDefId, LocalStructFieldId, VariantId,
18}; 18};
19use ra_arena::map::ArenaMap; 19use ra_arena::map::ArenaMap;
20 20
@@ -605,9 +605,9 @@ impl TraitEnvironment {
605/// Resolve the where clause(s) of an item with generics. 605/// Resolve the where clause(s) of an item with generics.
606pub(crate) fn generic_predicates_query( 606pub(crate) fn generic_predicates_query(
607 db: &impl HirDatabase, 607 db: &impl HirDatabase,
608 def: GenericDef, 608 def: GenericDefId,
609) -> Arc<[GenericPredicate]> { 609) -> Arc<[GenericPredicate]> {
610 let resolver = GenericDefId::from(def).resolver(db); 610 let resolver = def.resolver(db);
611 resolver 611 resolver
612 .where_predicates_in_scope() 612 .where_predicates_in_scope()
613 .flat_map(|pred| GenericPredicate::from_where_predicate(db, &resolver, pred)) 613 .flat_map(|pred| GenericPredicate::from_where_predicate(db, &resolver, pred))
@@ -819,12 +819,12 @@ impl CallableDef {
819 } 819 }
820} 820}
821 821
822impl From<CallableDef> for GenericDef { 822impl From<CallableDef> for GenericDefId {
823 fn from(def: CallableDef) -> GenericDef { 823 fn from(def: CallableDef) -> GenericDefId {
824 match def { 824 match def {
825 CallableDef::Function(f) => f.into(), 825 CallableDef::Function(f) => f.id.into(),
826 CallableDef::Struct(s) => s.into(), 826 CallableDef::Struct(s) => s.id.into(),
827 CallableDef::EnumVariant(e) => e.into(), 827 CallableDef::EnumVariant(e) => EnumVariantId::from(e).into(),
828 } 828 }
829 } 829 }
830} 830}