aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/chalk_cast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/chalk_cast.rs')
-rw-r--r--crates/hir_ty/src/chalk_cast.rs20
1 files changed, 2 insertions, 18 deletions
diff --git a/crates/hir_ty/src/chalk_cast.rs b/crates/hir_ty/src/chalk_cast.rs
index 8bdd32ad6..f27dee3fd 100644
--- a/crates/hir_ty/src/chalk_cast.rs
+++ b/crates/hir_ty/src/chalk_cast.rs
@@ -1,14 +1,8 @@
1//! Implementations of the Chalk `Cast` trait for our types. 1//! Implementations of the Chalk `Cast` trait for our types.
2 2
3use chalk_ir::{ 3use chalk_ir::interner::HasInterner;
4 cast::{Cast, CastTo},
5 interner::HasInterner,
6};
7 4
8use crate::{ 5use crate::{CallableSig, ReturnTypeImplTraits};
9 AliasEq, CallableSig, DomainGoal, GenericArg, GenericArgData, Interner, PolyFnSig,
10 ReturnTypeImplTraits, TraitRef, Ty, WhereClause,
11};
12 6
13macro_rules! has_interner { 7macro_rules! has_interner {
14 ($t:ty) => { 8 ($t:ty) => {
@@ -18,15 +12,5 @@ macro_rules! has_interner {
18 }; 12 };
19} 13}
20 14
21macro_rules! transitive_impl {
22 ($a:ty, $b:ty, $c:ty) => {
23 impl CastTo<$c> for $a {
24 fn cast_to(self, interner: &Interner) -> $c {
25 self.cast::<$b>(interner).cast(interner)
26 }
27 }
28 };
29}
30
31has_interner!(CallableSig); 15has_interner!(CallableSig);
32has_interner!(ReturnTypeImplTraits); 16has_interner!(ReturnTypeImplTraits);