Associated type bounds in some places in the compiler
This commit is contained in:
parent
8f55d6025f
commit
729cd55688
15 changed files with 22 additions and 41 deletions
|
@ -42,7 +42,7 @@ pub trait InferCtxtExt<'tcx> {
|
|||
fn type_implements_trait(
|
||||
&self,
|
||||
trait_def_id: DefId,
|
||||
params: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>,
|
||||
params: impl IntoIterator<Item: Into<GenericArg<'tcx>>>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
) -> traits::EvaluationResult;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
|
|||
fn type_implements_trait(
|
||||
&self,
|
||||
trait_def_id: DefId,
|
||||
params: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>,
|
||||
params: impl IntoIterator<Item: Into<GenericArg<'tcx>>>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
) -> traits::EvaluationResult {
|
||||
let trait_ref = self.tcx.mk_trait_ref(trait_def_id, params);
|
||||
|
|
|
@ -98,7 +98,7 @@ impl<'tcx> ObligationEmittingRelation<'tcx> for CollectAllMismatches<'_, 'tcx> {
|
|||
|
||||
fn register_predicates(
|
||||
&mut self,
|
||||
_obligations: impl IntoIterator<Item = impl ty::ToPredicate<'tcx>>,
|
||||
_obligations: impl IntoIterator<Item: ty::ToPredicate<'tcx>>,
|
||||
) {
|
||||
// FIXME(deferred_projection_equality)
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ pub fn predicate_for_trait_def<'tcx>(
|
|||
cause: ObligationCause<'tcx>,
|
||||
trait_def_id: DefId,
|
||||
recursion_depth: usize,
|
||||
params: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>,
|
||||
params: impl IntoIterator<Item: Into<GenericArg<'tcx>>>,
|
||||
) -> PredicateObligation<'tcx> {
|
||||
let trait_ref = tcx.mk_trait_ref(trait_def_id, params);
|
||||
predicate_for_trait_ref(tcx, cause, param_env, trait_ref, recursion_depth)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue