Skip to content

Commit e5d2947

Browse files
committed
Remove obsolete Cast impls
1 parent 429bbbd commit e5d2947

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

crates/hir_ty/src/chalk_cast.rs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,6 @@ macro_rules! has_interner {
1515
};
1616
}
1717

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-
4718
macro_rules! transitive_impl {
4819
($a:ty, $b:ty, $c:ty) => {
4920
impl CastTo<$c> for $a {
@@ -53,21 +24,3 @@ macro_rules! transitive_impl {
5324
}
5425
};
5526
}
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

Comments
 (0)