Rollup merge of #118302 - mu001999:dead_code/clean, r=cjgillot

Clean dead codes

Clean dead codes detected by #118257
This commit is contained in:
Guillaume Gomez 2023-11-26 15:44:54 +01:00 committed by GitHub
commit c67613bef9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 4 additions and 260 deletions

View file

@ -37,8 +37,6 @@ pub(super) trait GoalKind<'tcx>:
fn trait_ref(self, tcx: TyCtxt<'tcx>) -> ty::TraitRef<'tcx>;
fn polarity(self) -> ty::ImplPolarity;
fn with_self_ty(self, tcx: TyCtxt<'tcx>, self_ty: Ty<'tcx>) -> Self;
fn trait_def_id(self, tcx: TyCtxt<'tcx>) -> DefId;

View file

@ -64,8 +64,6 @@ enum GoalEvaluationKind {
trait CanonicalResponseExt {
fn has_no_inference_or_external_constraints(&self) -> bool;
fn has_only_region_constraints(&self) -> bool;
}
impl<'tcx> CanonicalResponseExt for Canonical<'tcx, Response<'tcx>> {
@ -74,11 +72,6 @@ impl<'tcx> CanonicalResponseExt for Canonical<'tcx, Response<'tcx>> {
&& self.value.var_values.is_identity()
&& self.value.external_constraints.opaque_types.is_empty()
}
fn has_only_region_constraints(&self) -> bool {
self.value.var_values.is_identity_modulo_regions()
&& self.value.external_constraints.opaque_types.is_empty()
}
}
impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {

View file

@ -101,10 +101,6 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
self.projection_ty.trait_ref(tcx)
}
fn polarity(self) -> ty::ImplPolarity {
ty::ImplPolarity::Positive
}
fn with_self_ty(self, tcx: TyCtxt<'tcx>, self_ty: Ty<'tcx>) -> Self {
self.with_self_ty(tcx, self_ty)
}

View file

@ -24,10 +24,6 @@ impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
self.trait_ref
}
fn polarity(self) -> ty::ImplPolarity {
self.polarity
}
fn with_self_ty(self, tcx: TyCtxt<'tcx>, self_ty: Ty<'tcx>) -> Self {
self.with_self_ty(tcx, self_ty)
}