Rollup merge of #115566 - zirconium-n:issue-107250-clean-up-unused-to-predicate, r=oli-obk
clean up unneeded `ToPredicate` impls Part of #107250. Removed all totally unused impls. And inlined two impls not need to satisify trait bound. r? `@oli-obk`
This commit is contained in:
commit
4e8f637783
6 changed files with 23 additions and 58 deletions
|
@ -18,7 +18,7 @@ use rustc_middle::ty::util::ExplicitSelf;
|
|||
use rustc_middle::ty::{
|
||||
self, GenericArgs, Ty, TypeFoldable, TypeFolder, TypeSuperFoldable, TypeVisitableExt,
|
||||
};
|
||||
use rustc_middle::ty::{GenericParamDefKind, ToPredicate, TyCtxt};
|
||||
use rustc_middle::ty::{GenericParamDefKind, TyCtxt};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt;
|
||||
use rustc_trait_selection::traits::outlives_bounds::InferCtxtExt as _;
|
||||
|
@ -2196,16 +2196,16 @@ pub(super) fn check_type_bounds<'tcx>(
|
|||
//
|
||||
// impl<T> X for T where T: X { type Y = <T as X>::Y; }
|
||||
}
|
||||
_ => predicates.push(
|
||||
_ => predicates.push(ty::Clause::from_projection_clause(
|
||||
tcx,
|
||||
ty::Binder::bind_with_vars(
|
||||
ty::ProjectionPredicate {
|
||||
projection_ty: tcx.mk_alias_ty(trait_ty.def_id, rebased_args),
|
||||
term: normalize_impl_ty.into(),
|
||||
},
|
||||
bound_vars,
|
||||
)
|
||||
.to_predicate(tcx),
|
||||
),
|
||||
),
|
||||
)),
|
||||
};
|
||||
ty::ParamEnv::new(tcx.mk_clauses(&predicates), Reveal::UserFacing)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue