@@ -15,35 +15,6 @@ macro_rules! has_interner {
15
15
} ;
16
16
}
17
17
18
- has_interner ! ( WhereClause ) ;
19
- has_interner ! ( DomainGoal ) ;
20
- has_interner ! ( GenericArg ) ;
21
- has_interner ! ( Ty ) ;
22
-
23
- impl CastTo < WhereClause > for TraitRef {
24
- fn cast_to ( self , _interner : & Interner ) -> WhereClause {
25
- WhereClause :: Implemented ( self )
26
- }
27
- }
28
-
29
- impl CastTo < WhereClause > for AliasEq {
30
- fn cast_to ( self , _interner : & Interner ) -> WhereClause {
31
- WhereClause :: AliasEq ( self )
32
- }
33
- }
34
-
35
- impl CastTo < DomainGoal > for WhereClause {
36
- fn cast_to ( self , _interner : & Interner ) -> DomainGoal {
37
- DomainGoal :: Holds ( self )
38
- }
39
- }
40
-
41
- impl CastTo < GenericArg > for Ty {
42
- fn cast_to ( self , interner : & Interner ) -> GenericArg {
43
- GenericArg :: new ( interner, GenericArgData :: Ty ( self ) )
44
- }
45
- }
46
-
47
18
macro_rules! transitive_impl {
48
19
( $a: ty, $b: ty, $c: ty) => {
49
20
impl CastTo <$c> for $a {
@@ -53,21 +24,3 @@ macro_rules! transitive_impl {
53
24
}
54
25
} ;
55
26
}
56
-
57
- // In Chalk, these can be done as blanket impls, but that doesn't work here
58
- // because of coherence
59
-
60
- transitive_impl ! ( TraitRef , WhereClause , DomainGoal ) ;
61
- transitive_impl ! ( AliasEq , WhereClause , DomainGoal ) ;
62
-
63
- macro_rules! reflexive_impl {
64
- ( $a: ty) => {
65
- impl CastTo <$a> for $a {
66
- fn cast_to( self , _interner: & Interner ) -> $a {
67
- self
68
- }
69
- }
70
- } ;
71
- }
72
-
73
- reflexive_impl ! ( GenericArg ) ;
0 commit comments