Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/chalk_db.rs')
-rw-r--r--crates/hir-ty/src/chalk_db.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-ty/src/chalk_db.rs b/crates/hir-ty/src/chalk_db.rs
index a3e4da5d1a..e74e3d7898 100644
--- a/crates/hir-ty/src/chalk_db.rs
+++ b/crates/hir-ty/src/chalk_db.rs
@@ -381,9 +381,9 @@ impl chalk_solve::RustIrDatabase<Interner> for ChalkContext<'_> {
TyKind::Error.intern(Interner)
}
- fn is_object_safe(&self, _trait_id: chalk_ir::TraitId<Interner>) -> bool {
- // FIXME: implement actual object safety
- true
+ fn is_object_safe(&self, trait_id: chalk_ir::TraitId<Interner>) -> bool {
+ let trait_ = from_chalk_trait_id(trait_id);
+ crate::object_safety::object_safety(self.db, trait_).is_none()
}
fn closure_kind(