Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/chalk_ext.rs')
-rw-r--r--crates/hir-ty/src/chalk_ext.rs21
1 files changed, 2 insertions, 19 deletions
diff --git a/crates/hir-ty/src/chalk_ext.rs b/crates/hir-ty/src/chalk_ext.rs
index a315f699dd..4ea563d46e 100644
--- a/crates/hir-ty/src/chalk_ext.rs
+++ b/crates/hir-ty/src/chalk_ext.rs
@@ -3,8 +3,8 @@
use hir_def::{ItemContainerId, Lookup, TraitId};
use crate::{
- Binders, DynTy, Interner, ProjectionTy, Substitution, TraitRef, Ty, db::HirDatabase,
- from_assoc_type_id, from_chalk_trait_id, generics::generics, to_chalk_trait_id,
+ Interner, ProjectionTy, Substitution, TraitRef, Ty, db::HirDatabase, from_assoc_type_id,
+ from_chalk_trait_id, generics::generics, to_chalk_trait_id,
};
pub(crate) trait ProjectionTyExt {
@@ -35,23 +35,6 @@ impl ProjectionTyExt for ProjectionTy {
}
}
-pub(crate) trait DynTyExt {
- fn principal(&self) -> Option<Binders<Binders<&TraitRef>>>;
-}
-
-impl DynTyExt for DynTy {
- fn principal(&self) -> Option<Binders<Binders<&TraitRef>>> {
- self.bounds.as_ref().filter_map(|bounds| {
- bounds.interned().first().and_then(|b| {
- b.as_ref().filter_map(|b| match b {
- crate::WhereClause::Implemented(trait_ref) => Some(trait_ref),
- _ => None,
- })
- })
- })
- }
-}
-
pub(crate) trait TraitRefExt {
fn hir_trait_id(&self) -> TraitId;
}