diff options
author | Florian Diebold <[email protected]> | 2021-03-13 16:55:50 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-13 16:56:48 +0000 |
commit | 9719ce9fc731a400c9744ba1a6569e978c1a97e7 (patch) | |
tree | a9c674c83723e2ed145793f72450c873da62a6fc /crates/hir_ty/src/traits | |
parent | 19664e276aba21a42cad5351a2c91995d1ce5d52 (diff) |
Use chalk_ir::FnDefId
Diffstat (limited to 'crates/hir_ty/src/traits')
-rw-r--r-- | crates/hir_ty/src/traits/chalk.rs | 4 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk/interner.rs | 1 | ||||
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 5 |
3 files changed, 4 insertions, 6 deletions
diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs index 2d3cd6719..bb92d8e2a 100644 --- a/crates/hir_ty/src/traits/chalk.rs +++ b/crates/hir_ty/src/traits/chalk.rs | |||
@@ -21,8 +21,8 @@ use crate::{ | |||
21 | method_resolution::{TyFingerprint, ALL_FLOAT_FPS, ALL_INT_FPS}, | 21 | method_resolution::{TyFingerprint, ALL_FLOAT_FPS, ALL_INT_FPS}, |
22 | to_assoc_type_id, | 22 | to_assoc_type_id, |
23 | utils::generics, | 23 | utils::generics, |
24 | BoundVar, CallableDefId, CallableSig, DebruijnIndex, GenericPredicate, ProjectionPredicate, | 24 | BoundVar, CallableDefId, CallableSig, DebruijnIndex, FnDefId, GenericPredicate, |
25 | ProjectionTy, Substs, TraitRef, Ty, TyKind, | 25 | ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TyKind, |
26 | }; | 26 | }; |
27 | use mapping::{ | 27 | use mapping::{ |
28 | convert_where_clauses, generic_predicate_to_inline_bound, make_binders, TypeAliasAsValue, | 28 | convert_where_clauses, generic_predicate_to_inline_bound, make_binders, TypeAliasAsValue, |
diff --git a/crates/hir_ty/src/traits/chalk/interner.rs b/crates/hir_ty/src/traits/chalk/interner.rs index e891efb7b..1dc3f497d 100644 --- a/crates/hir_ty/src/traits/chalk/interner.rs +++ b/crates/hir_ty/src/traits/chalk/interner.rs | |||
@@ -20,7 +20,6 @@ pub(crate) type ImplId = chalk_ir::ImplId<Interner>; | |||
20 | pub(crate) type ImplDatum = chalk_solve::rust_ir::ImplDatum<Interner>; | 20 | pub(crate) type ImplDatum = chalk_solve::rust_ir::ImplDatum<Interner>; |
21 | pub(crate) type AssociatedTyValueId = chalk_solve::rust_ir::AssociatedTyValueId<Interner>; | 21 | pub(crate) type AssociatedTyValueId = chalk_solve::rust_ir::AssociatedTyValueId<Interner>; |
22 | pub(crate) type AssociatedTyValue = chalk_solve::rust_ir::AssociatedTyValue<Interner>; | 22 | pub(crate) type AssociatedTyValue = chalk_solve::rust_ir::AssociatedTyValue<Interner>; |
23 | pub(crate) type FnDefId = chalk_ir::FnDefId<Interner>; | ||
24 | pub(crate) type FnDefDatum = chalk_solve::rust_ir::FnDefDatum<Interner>; | 23 | pub(crate) type FnDefDatum = chalk_solve::rust_ir::FnDefDatum<Interner>; |
25 | pub(crate) type OpaqueTyId = chalk_ir::OpaqueTyId<Interner>; | 24 | pub(crate) type OpaqueTyId = chalk_ir::OpaqueTyId<Interner>; |
26 | pub(crate) type OpaqueTyDatum = chalk_solve::rust_ir::OpaqueTyDatum<Interner>; | 25 | pub(crate) type OpaqueTyDatum = chalk_solve::rust_ir::OpaqueTyDatum<Interner>; |
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 67ac95a0e..23ef07d77 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs | |||
@@ -66,8 +66,7 @@ impl ToChalk for Ty { | |||
66 | chalk_ir::TyKind::Slice(substs[0].clone().to_chalk(db)).intern(&Interner) | 66 | chalk_ir::TyKind::Slice(substs[0].clone().to_chalk(db)).intern(&Interner) |
67 | } | 67 | } |
68 | TyKind::Str => chalk_ir::TyKind::Str.intern(&Interner), | 68 | TyKind::Str => chalk_ir::TyKind::Str.intern(&Interner), |
69 | TyKind::FnDef(callable_def, substs) => { | 69 | TyKind::FnDef(id, substs) => { |
70 | let id = callable_def.to_chalk(db); | ||
71 | let substitution = substs.to_chalk(db); | 70 | let substitution = substs.to_chalk(db); |
72 | chalk_ir::TyKind::FnDef(id, substitution).intern(&Interner) | 71 | chalk_ir::TyKind::FnDef(id, substitution).intern(&Interner) |
73 | } | 72 | } |
@@ -201,7 +200,7 @@ impl ToChalk for Ty { | |||
201 | chalk_ir::TyKind::Never => TyKind::Never, | 200 | chalk_ir::TyKind::Never => TyKind::Never, |
202 | 201 | ||
203 | chalk_ir::TyKind::FnDef(fn_def_id, subst) => { | 202 | chalk_ir::TyKind::FnDef(fn_def_id, subst) => { |
204 | TyKind::FnDef(from_chalk(db, fn_def_id), from_chalk(db, subst)) | 203 | TyKind::FnDef(fn_def_id, from_chalk(db, subst)) |
205 | } | 204 | } |
206 | 205 | ||
207 | chalk_ir::TyKind::Closure(id, subst) => { | 206 | chalk_ir::TyKind::Closure(id, subst) => { |