Get rid of trait_ref_is_knowable from delegate

This commit is contained in:
Michael Goulet 2024-07-06 18:32:06 -04:00
parent a982471e07
commit ab27c2fa77
4 changed files with 4 additions and 21 deletions

View file

@ -15,7 +15,6 @@ use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt as _};
use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP};
use rustc_type_ir::solve::{Certainty, NoSolution, SolverMode};
use crate::traits::coherence::trait_ref_is_knowable;
use crate::traits::specialization_graph;
#[repr(transparent)]
@ -200,15 +199,6 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
let _ = self.take_opaque_types();
}
fn trait_ref_is_knowable<E: std::fmt::Debug>(
&self,
trait_ref: ty::TraitRef<'tcx>,
lazily_normalize_ty: impl FnMut(Ty<'tcx>) -> Result<Ty<'tcx>, E>,
) -> Result<bool, E> {
trait_ref_is_knowable(&self.0, trait_ref, lazily_normalize_ty)
.map(|is_knowable| is_knowable.is_ok())
}
fn fetch_eligible_assoc_item(
&self,
param_env: ty::ParamEnv<'tcx>,