Skip to content

Commit 9127568

Browse files
authored
Merge pull request #583 from vandenheuvel/remove_impl_for
Remove `force_impl_for` from `RustIrDatabase`
2 parents 54116bd + 57ee1ab commit 9127568

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

chalk-solve/src/clauses/builtin_traits.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ pub fn add_builtin_program_clauses<I: Interner>(
2323
builder.push_binders(&generalized, |builder, trait_ref| {
2424
let self_ty = trait_ref.self_type_parameter(db.interner());
2525
let ty = self_ty.data(db.interner());
26-
if let Some(force_impl) = db.force_impl_for(well_known, ty) {
27-
if force_impl {
28-
builder.push_fact(trait_ref.clone());
29-
}
30-
return Ok(());
31-
}
3226

3327
match well_known {
3428
WellKnownTrait::Sized => sized::add_sized_program_clauses(db, builder, &trait_ref, ty),

chalk-solve/src/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,6 @@ pub trait RustIrDatabase<I: Interner>: Debug {
8888
/// user gave).
8989
fn impl_provided_for(&self, auto_trait_id: TraitId<I>, adt_id: AdtId<I>) -> bool;
9090

91-
/// A stop-gap solution to force an impl for a given well-known trait.
92-
/// Useful when the logic for a given trait is absent or incomplete.
93-
/// A value of `Some(true)` means that the the clause for the impl will be
94-
/// added. A value of `Some(false)` means that the clause for the impl will
95-
/// not be added, and fallback logic will not be checked. A value of `None`
96-
/// means that the clause will not be added, but fallback logic may add logic.
97-
#[allow(unused_variables)]
98-
fn force_impl_for(&self, well_known: WellKnownTrait, ty: &TyData<I>) -> Option<bool> {
99-
None
100-
}
101-
10291
/// Returns id of a trait lang item, if found
10392
fn well_known_trait_id(&self, well_known_trait: WellKnownTrait) -> Option<TraitId<I>>;
10493

0 commit comments

Comments
 (0)